mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
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: 94cc89eb8f
("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>
This commit is contained in:
parent
0c2191c3da
commit
1d512ee861
1 changed files with 2 additions and 0 deletions
|
@ -707,6 +707,8 @@ struct regmap *__regmap_init(struct device *dev,
|
|||
}
|
||||
}
|
||||
|
||||
ret = -EINVAL; /* Later error paths rely on this */
|
||||
|
||||
if (config->disable_locking) {
|
||||
map->lock = map->unlock = regmap_lock_unlock_none;
|
||||
map->can_sleep = config->can_sleep;
|
||||
|
|
Loading…
Reference in a new issue