Re: [PATCH v5 2/2] regcache: Move HW readback after cache initialisation

From: Andy Shevchenko

Date: Tue Mar 03 2026 - 10:38:48 EST


On Tue, Mar 03, 2026 at 01:03:11PM +0000, Mark Brown wrote:
> On Tue, Mar 03, 2026 at 10:26:25AM +0100, Andy Shevchenko wrote:

...

> > int regcache_init(struct regmap *map, const struct regmap_config *config)

> > ret = map->cache_ops->init(map);
> > map->unlock(map->lock_arg);
> > if (ret)
> > - goto err_free;
> > + return ret;
> > }
>
> We might still need to free the copy we take of supplied reg_defaults,
> it's not just the hw_init case.

I see, so someone transfers an ownership to that allocation...
I'll check more, thanks!

--
With Best Regards,
Andy Shevchenko