This is a note to let you know that I've just added the patch titled regmap: debugfs: Fix more error path regressions to the 5.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: regmap-debugfs-fix-more-error-path-regressions.patch and it can be found in the queue-5.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit e09dbdfb3998bd8a3be4d4ff9a54da53b56cf1b1 Author: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx> Date: Fri Sep 18 16:22:12 2020 +0100 regmap: debugfs: Fix more error path regressions [ Upstream commit 1d512ee861b80da63cbc501b973c53131aa22f29 ] 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: 94cc89eb8fa5 ("regmap: debugfs: Fix handling of name string for debugfs init delays") Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20200918152212.22200-1-ckeepax@xxxxxxxxxxxxxxxxxxxxx Signed-off-by: Mark Brown <broonie@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index b71f9ecddff5d..fff0547c26c53 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -711,6 +711,8 @@ struct regmap *__regmap_init(struct device *dev, if (ret) goto err_map; + ret = -EINVAL; /* Later error paths rely on this */ + if (config->disable_locking) { map->lock = map->unlock = regmap_lock_unlock_none; regmap_debugfs_disable(map);