Re: [PATCH v3 2/2] iio: light: gp2ap020a00f: correct return type to int

From: Andy Shevchenko

Date: Mon Feb 16 2026 - 02:10:34 EST


On Sun, Feb 15, 2026 at 06:53:17PM -0600, Ethan Tidmore wrote:
> The function gp2ap020a00f_get_thresh_reg() can return -EINVAL in its
> error path. Yet, the function has return type of u8. Added error
> checking for gp2ap020a00f_get_thresh_reg() return value.
>
> Detected by Smatch:
> drivers/iio/light/gp2ap020a00f.c:1013 gp2ap020a00f_get_thresh_reg() warn:
> signedness bug returning '(-22)'

LGTM now,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>

--
With Best Regards,
Andy Shevchenko