* [PATCH] w1: omap-hdq: fix error return code in omap_hdq_probe()
@ 2017-06-30 22:44 Gustavo A. R. Silva
[not found] ` <865431499441939@web32j.yandex.ru>
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2017-06-30 22:44 UTC (permalink / raw)
To: Evgeniy Polyakov; +Cc: linux-kernel, Gustavo A. R. Silva
platform_get_irq() returns an error code, but the omap_hdq
driver ignores it and always returns -ENXIO. This is not correct,
and prevents -EPROBE_DEFER from being propagated properly.
Notice that platform_get_irq() no longer returns 0 on error.
Print error message and propagate the return value of
platform_get_irq on failure.
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
drivers/w1/masters/omap_hdq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index 3612542..83fc9aa 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -704,7 +704,8 @@ static int omap_hdq_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0);
if (irq < 0) {
- ret = -ENXIO;
+ dev_dbg(&pdev->dev, "Failed to get IRQ: %d\n", irq);
+ ret = irq;
goto err_irq;
}
--
2.5.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-10 19:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-30 22:44 [PATCH] w1: omap-hdq: fix error return code in omap_hdq_probe() Gustavo A. R. Silva
[not found] ` <865431499441939@web32j.yandex.ru>
2017-07-10 19:35 ` Gustavo A. R. Silva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome