mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
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>
This commit is contained in:
parent
790cf9e3da
commit
35b871f72a
@ -551,12 +551,9 @@ static int sun50i_h5_pinctrl_probe(struct platform_device *pdev)
|
||||
int ret;
|
||||
|
||||
ret = platform_irq_count(pdev);
|
||||
if (ret < 0) {
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev, "Couldn't determine irq count: %pe\n",
|
||||
ERR_PTR(ret));
|
||||
return ret;
|
||||
}
|
||||
if (ret < 0)
|
||||
return dev_err_probe(&pdev->dev, ret,
|
||||
"Couldn't determine irq count\n");
|
||||
|
||||
switch (ret) {
|
||||
case 2:
|
||||
|
Loading…
Reference in New Issue
Block a user