mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 14:23:49 +01:00
driver core: platform: Make use of the helper function dev_err_probe()
When possible using dev_err_probe() helps to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Signed-off-by: Cai Huoqing <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
1 parent
a6914afcdf
commit
2043727c28
1 file changed
+3
-2
@@ -258,8 +258,9 @@ int platform_get_irq(struct platform_device *dev, unsigned int num)
|
||||
int ret;
|
||||
|
||||
ret = platform_get_irq_optional(dev, num);
|
||||
if (ret < 0 && ret != -EPROBE_DEFER)
|
||||
dev_err(&dev->dev, "IRQ index %u not found\n", num);
|
||||
if (ret < 0)
|
||||
return dev_err_probe(&dev->dev, ret,
|
||||
"IRQ index %u not found\n", num);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user