Skip to content

Commit 35b871f

Browse files
Yang Yinglianglinusw
authored andcommitted
pinctrl: sunxi: sun50i-h5: Switch to use dev_err_probe() helper
In the probe path, dev_err() can be replace with dev_err_probe() which will check if error code is -EPROBE_DEFER and and prints the error name. Signed-off-by: Yang Yingliang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 790cf9e commit 35b871f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -551,12 +551,9 @@ static int sun50i_h5_pinctrl_probe(struct platform_device *pdev)
551551
int ret;
552552

553553
ret = platform_irq_count(pdev);
554-
if (ret < 0) {
555-
if (ret != -EPROBE_DEFER)
556-
dev_err(&pdev->dev, "Couldn't determine irq count: %pe\n",
557-
ERR_PTR(ret));
558-
return ret;
559-
}
554+
if (ret < 0)
555+
return dev_err_probe(&pdev->dev, ret,
556+
"Couldn't determine irq count\n");
560557

561558
switch (ret) {
562559
case 2:

0 commit comments

Comments
 (0)