diff options
author | Fabien Dessenne <fabien.dessenne@st.com> | 2019-04-24 15:51:25 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-04-27 16:07:51 +0300 |
commit | 3e53ef91f826957dec013c47707ffc1bb42b42d7 (patch) | |
tree | 410cadc0e9b1cd1dd1a73436bd3613a3df4d8079 /drivers/iio/adc/stm32-dfsdm-adc.c | |
parent | 17b62779cbe40773e10a83af000e51c29b764575 (diff) | |
download | linux-3e53ef91f826957dec013c47707ffc1bb42b42d7.tar.xz |
iio: adc: stm32-dfsdm: manage the get_irq error case
During probe, check the "get_irq" error value.
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/stm32-dfsdm-adc.c')
-rw-r--r-- | drivers/iio/adc/stm32-dfsdm-adc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/iio/adc/stm32-dfsdm-adc.c b/drivers/iio/adc/stm32-dfsdm-adc.c index 19adc2b23472..588907cc3b6b 100644 --- a/drivers/iio/adc/stm32-dfsdm-adc.c +++ b/drivers/iio/adc/stm32-dfsdm-adc.c @@ -1456,6 +1456,12 @@ static int stm32_dfsdm_adc_probe(struct platform_device *pdev) * So IRQ associated to filter instance 0 is dedicated to the Filter 0. */ irq = platform_get_irq(pdev, 0); + if (irq < 0) { + if (irq != -EPROBE_DEFER) + dev_err(dev, "Failed to get IRQ: %d\n", irq); + return irq; + } + ret = devm_request_irq(dev, irq, stm32_dfsdm_irq, 0, pdev->name, adc); if (ret < 0) { |