Patch "iio: adc: cpcap: fix incorrect validation" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
iio: adc: cpcap: fix incorrect validation
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
iio-adc-cpcap-fix-incorrect-validation.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
81b039ec36a41a5451e1e36f05bb055eceab1dc8Mon Sep 17 00:00:00 2001
From: Pan Bian <[email protected]>
Date: Mon, 13 Nov 2017 00:01:20 +0800
Subject: iio: adc: cpcap: fix incorrect validation
From: Pan Bian <[email protected]>
commit 81b039ec36a41a5451e1e36f05bb055eceab1dc8 upstream.
Function platform_get_irq_byname() returns a negative error code on failure, and a zero or positive number on success. However, in function cpcap_adc_probe(), positive IRQ numbers are also taken as error cases. Use "if (ddata->irq < 0)" instead of "if (!ddata->irq)" to validate the return value of platform_get_irq_byname().
--- drivers/iio/adc/cpcap-adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/cpcap-adc.c +1 -1
@@ -1012,7 +1012,7 @@ static int cpcap_adc_probe(struct platfoplatform_set_drvdata (pdev, indio_dev); ddata->irq =platform_get_irq_byname (pdev,"adcdone" ); -if (!ddata->irq) +if (ddata->irq <0 )return -ENODEV ; error = devm_request_threaded_irq(&pdev->dev, ddata->irq, NULL,
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/efi-esrt-use-memunmap-instead-of-kfree-to-free-the-remapping.patch queue-4.14/iio-adc-cpcap-fix-incorrect-validation.patch