2022-02-04 22:48:33

by Sergey Shtylyov

[permalink] [raw]
Subject: [PATCH] platform: use dev_err_probe() in platform_get_irq_byname()

The commit 2043727c2882 ("driver core: platform: Make use of the helper
function dev_err_probe()") missed to also convert platform_get_irq_byname()
for some strange reason -- do that now.

Signed-off-by: Sergey Shtylyov <[email protected]>

---
drivers/base/platform.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Index: driver-core/drivers/base/platform.c
===================================================================
--- driver-core.orig/drivers/base/platform.c
+++ driver-core/drivers/base/platform.c
@@ -469,9 +469,9 @@ int platform_get_irq_byname(struct platf
int ret;

ret = __platform_get_irq_byname(dev, name);
- if (ret < 0 && ret != -EPROBE_DEFER)
- dev_err(&dev->dev, "IRQ %s not found\n", name);
-
+ if (ret < 0)
+ return dev_err_probe(&dev->dev, ret, "IRQ %s not found\n",
+ name);
return ret;
}
EXPORT_SYMBOL_GPL(platform_get_irq_byname);