Re: [PATCH] iio: light: cm32181: return zero after writing calibscale
From: Joshua Crofts
Date: Fri Jul 31 2026 - 10:16:38 EST
On Fri, 31 Jul 2026 17:20:48 +0400
Giorgi Tchankvetadze <giorgitchankvetadze1997@xxxxxxxxx> wrote:
> From: Giorgi Tchankvetadze <giorgi@xxxxxxxxxxxxxxxxx>
>
> The write_raw callback is documented to return 0 on success or a
> negative error code. However, the IIO_CHAN_INFO_CALIBSCALE case
> returns 'val' (the user-supplied value) instead of 0.
>
> Fix it by returning 0 on success, matching the behavior of other
> calibscale implementations in the subsystem.
>
> Fixes: 971672c0b3cc ("iio: add Capella CM32181 ambient light sensor driver.")
> Signed-off-by: Giorgi Tchankvetadze <giorgi@xxxxxxxxxxxxxxxxx>
> ---
LGTM.
Reviewed-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
--
Kind regards,
Joshua Crofts