Commit 3e53ef91 authored by Fabien Dessenne's avatar Fabien Dessenne Committed by Jonathan Cameron

iio: adc: stm32-dfsdm: manage the get_irq error case

During probe, check the "get_irq" error value.
Signed-off-by: default avatarFabien Dessenne <fabien.dessenne@st.com>
Acked-by: default avatarFabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 17b62779
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment