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: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Tested-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org> Cc: Stable@vger.kernel.org
Showing
想要评论请 注册 或 登录