Re: [PATCH] iio: light: vcnl4035: Propagate regcache_sync() errors

From: Jonathan Cameron

Date: Sat Jul 11 2026 - 18:37:46 EST


On Sat, 4 Jul 2026 15:11:14 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:

> On Sat, Jul 04, 2026 at 03:14:10PM +0800, Pengpeng Hou wrote:
> > vcnl4035_runtime_suspend() marks the regmap cache dirty before runtime
> > suspend. vcnl4035_runtime_resume() then syncs the cache before re-
> > enabling ALS, but currently ignores a regcache_sync() failure and can
> > still report resume success.
> >
> > Return the regcache_sync() error so the PM core sees the failed register
> > restore.
>
> ...
>
> > - regcache_sync(data->regmap);
> > + ret = regcache_sync(data->regmap);
> > + if (ret < 0)
> > + return ret;
>
> When do like this, add a blank line.
> Same comment to all similar patches you sent (or about to send).
On this occasion I fixed up and applied rather than waiting for a v2.
Applied to the testing branch of iio.git.

Thanks,

Jonathan

>
> > ret = vcnl4035_set_als_power_state(data, VCNL4035_MODE_ALS_ENABLE);
> > if (ret < 0)
> > return ret;
>