Skip to content

Commit 35b871f

Browse files
Yang YingliangLinus Walleij
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 <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220917122208.1894769-1-yangyingliang@huawei.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 790cf9e commit 35b871f

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

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)