Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: adc: Add check for devm_request_threaded_irq

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>

authored by

Jiasheng Jiang and committed by
Jonathan Cameron
b30537a4 10dce8de

+2
+2
drivers/iio/adc/twl6030-gpadc.c
··· 911 911 ret = devm_request_threaded_irq(dev, irq, NULL, 912 912 twl6030_gpadc_irq_handler, 913 913 IRQF_ONESHOT, "twl6030_gpadc", indio_dev); 914 + if (ret) 915 + return ret; 914 916 915 917 ret = twl6030_gpadc_enable_irq(TWL6030_GPADC_RT_SW1_EOC_MASK); 916 918 if (ret < 0) {