diff options
author | Jiasheng Jiang <jiasheng@iscas.ac.cn> | 2022-02-24 09:28:49 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-20 10:08:19 +0300 |
commit | 35b1cf7e2f61af1b4b9a28449cb6f8b0109f4fe0 (patch) | |
tree | 33372b4e19cb321a4bca3da3d897b6ef4af3dd64 /drivers/iio/adc | |
parent | 48db011da841427638ff26a1981e266fedc666e8 (diff) | |
download | linux-35b1cf7e2f61af1b4b9a28449cb6f8b0109f4fe0.tar.xz |
iio: adc: Add check for devm_request_threaded_irq
[ Upstream commit b30537a4cedcacf0ade2f33ebb7610178ed1e7d7 ]
As the potential failure of the devm_request_threaded_irq(),
it should be better to check the return value and return
error if fails.
Fixes: fa659a40b80b ("iio: adc: twl6030-gpadc: Use devm_* API family")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20220224062849.3280966-1-jiasheng@iscas.ac.cn
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r-- | drivers/iio/adc/twl6030-gpadc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c index bc0e60b9da45..6a4ec58eb9c5 100644 --- a/drivers/iio/adc/twl6030-gpadc.c +++ b/drivers/iio/adc/twl6030-gpadc.c @@ -927,6 +927,8 @@ static int twl6030_gpadc_probe(struct platform_device *pdev) ret = devm_request_threaded_irq(dev, irq, NULL, twl6030_gpadc_irq_handler, IRQF_ONESHOT, "twl6030_gpadc", indio_dev); + if (ret) + return ret; ret = twl6030_gpadc_enable_irq(TWL6030_GPADC_RT_SW1_EOC_MASK); if (ret < 0) { |