]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
w1: omap-hdq: fix error return code in omap_hdq_probe()
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Fri, 30 Jun 2017 22:44:02 +0000 (17:44 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Jul 2017 14:48:15 +0000 (16:48 +0200)
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>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/w1/masters/omap_hdq.c

index 3612542b604444bbfdf30a2212e45e830eb5e9d3..83fc9aab34e872377274c3521055365fc618bef4 100644 (file)
@@ -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;
        }