Re: [PATCH] iio: light: vcnl4035: Propagate regcache_sync() errors
From: Andy Shevchenko
Date: Sat Jul 04 2026 - 08:11:39 EST
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).
> ret = vcnl4035_set_als_power_state(data, VCNL4035_MODE_ALS_ENABLE);
> if (ret < 0)
> return ret;
--
With Best Regards,
Andy Shevchenko