diff options
| author | Gustavo A. R. Silva <garsilva@embeddedor.com> | 2017-06-30 18:44:02 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-17 10:48:15 -0400 |
| commit | c89876dda01841a6a485cb29b9d1843db34958a3 (patch) | |
| tree | f63749c77505f3e7817b0d72f6303be7551d1770 | |
| parent | cc84b824e489ef001597ea0ba0ddcec17fb1f05d (diff) | |
w1: omap-hdq: fix error return code in omap_hdq_probe()
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>
| -rw-r--r-- | drivers/w1/masters/omap_hdq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c index 3612542b6044..83fc9aab34e8 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) | |||
| 704 | 704 | ||
| 705 | irq = platform_get_irq(pdev, 0); | 705 | irq = platform_get_irq(pdev, 0); |
| 706 | if (irq < 0) { | 706 | if (irq < 0) { |
| 707 | ret = -ENXIO; | 707 | dev_dbg(&pdev->dev, "Failed to get IRQ: %d\n", irq); |
| 708 | ret = irq; | ||
| 708 | goto err_irq; | 709 | goto err_irq; |
| 709 | } | 710 | } |
| 710 | 711 | ||
