]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
iio: adc: at91: signedness bug in at91_adc_get_trigger_value_by_name()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 6 Nov 2014 09:13:00 +0000 (09:13 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sat, 14 Jun 2014 14:31:20 +0000 (15:31 +0100)
commit4f3bcd878f1d3c730fe00f619b7260c6125d49eb
treea1cca2b92384c509819893f9931fd8b48d8c824c
parent19bc4981a213d0c5b0e1e8b08815c0b26f01ec54
iio: adc: at91: signedness bug in at91_adc_get_trigger_value_by_name()

at91_adc_get_trigger_value_by_name() was returning -ENOMEM truncated to
a positive u8 and that doesn't work.  I've changed it to int and
refactored it to preserve the error code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: Stable@vger.kernel.org
drivers/iio/adc/at91_adc.c