Skip to content

Commit 1d512ee

Browse files
charleskeepaxbroonie
authored andcommitted
regmap: debugfs: Fix more error path regressions
Many error paths in __regmap_init rely on ret being pre-initialised to -EINVAL, add an extra initialisation in after the new call to regmap_set_name. Fixes: 94cc89e ("regmap: debugfs: Fix handling of name string for debugfs init delays") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200918152212.22200-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 0c2191c commit 1d512ee

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/base/regmap/regmap.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,8 @@ struct regmap *__regmap_init(struct device *dev,
707707
}
708708
}
709709

710+
ret = -EINVAL; /* Later error paths rely on this */
711+
710712
if (config->disable_locking) {
711713
map->lock = map->unlock = regmap_lock_unlock_none;
712714
map->can_sleep = config->can_sleep;

0 commit comments

Comments
 (0)