Skip to content

Commit 6a64344

Browse files
Yang Yingliangjernejsk
authored andcommitted
clk: sunxi-ng: ccu-sun9i-a80-usb: Use dev_err_probe() helper
dev_err() can be replace with dev_err_probe() which will check if error code is -EPROBE_DEFER. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://lore.kernel.org/r/20220827094151.3323450-3-yangyingliang@huawei.com
1 parent 6554898 commit 6a64344

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

drivers/clk/sunxi-ng/ccu-sun9i-a80-usb.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,9 @@ static int sun9i_a80_usb_clk_probe(struct platform_device *pdev)
101101
return PTR_ERR(reg);
102102

103103
bus_clk = devm_clk_get(&pdev->dev, "bus");
104-
if (IS_ERR(bus_clk)) {
105-
ret = PTR_ERR(bus_clk);
106-
if (ret != -EPROBE_DEFER)
107-
dev_err(&pdev->dev, "Couldn't get bus clk: %d\n", ret);
108-
return ret;
109-
}
104+
if (IS_ERR(bus_clk))
105+
return dev_err_probe(&pdev->dev, PTR_ERR(bus_clk),
106+
"Couldn't get bus clk\n");
110107

111108
/* The bus clock needs to be enabled for us to access the registers */
112109
ret = clk_prepare_enable(bus_clk);

0 commit comments

Comments
 (0)