summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/lpc32xx_adc.c
diff options
context:
space:
mode:
authorRuan Jinjie <ruanjinjie@huawei.com>2023-07-27 16:16:07 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2023-07-29 18:23:45 +0300
commitc09ddcdd4dd32ee9768dc233ead4b3d726f26d38 (patch)
tree8206bd2bdd3358111eea275c1788e15583fc2908 /drivers/iio/adc/lpc32xx_adc.c
parent49d736313d0975ddeb156f4f59801da833f78b30 (diff)
downloadlinux-c09ddcdd4dd32ee9768dc233ead4b3d726f26d38.tar.xz
iio: adc: fix the return value handle for platform_get_irq()
There is no possible for platform_get_irq() to return 0 and the return value of platform_get_irq() is more sensible to show the error reason. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Link: https://lore.kernel.org/r/20230727131607.2897937-1-ruanjinjie@huawei.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/lpc32xx_adc.c')
-rw-r--r--drivers/iio/adc/lpc32xx_adc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/adc/lpc32xx_adc.c b/drivers/iio/adc/lpc32xx_adc.c
index 732c924a976d..e34ed7dacd89 100644
--- a/drivers/iio/adc/lpc32xx_adc.c
+++ b/drivers/iio/adc/lpc32xx_adc.c
@@ -176,8 +176,8 @@ static int lpc32xx_adc_probe(struct platform_device *pdev)
}
irq = platform_get_irq(pdev, 0);
- if (irq <= 0)
- return -ENXIO;
+ if (irq < 0)
+ return irq;
retval = devm_request_irq(&pdev->dev, irq, lpc32xx_adc_isr, 0,
LPC32XXAD_NAME, st);