Merge tag 'regmap-fix-v7.2-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

Pull regmap fix from Mark Brown:
 "Ensure that we don't overwrite the error code when cleaning up a
  failed cache initialisation, helping people debug issues if they
  do arise"

* tag 'regmap-fix-v7.2-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regcache: Do not overwrite error code when finalizing cache after error
This commit is contained in:
Linus Torvalds
2026-06-26 10:47:26 -07:00

View File

@@ -245,7 +245,7 @@ int regcache_init(struct regmap *map, const struct regmap_config *config)
if (map->cache_ops->exit) {
dev_dbg(map->dev, "Destroying %s cache\n", map->cache_ops->name);
map->lock(map->lock_arg);
ret = map->cache_ops->exit(map);
map->cache_ops->exit(map);
map->unlock(map->lock_arg);
}
err_free_reg_defaults: