未验证 提交 1d512ee8 编写于 作者: C Charles Keepax 提交者: Mark Brown

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: 94cc89eb ("regmap: debugfs: Fix handling of name string for debugfs init delays")
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200918152212.22200-1-ckeepax@opensource.cirrus.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 0c2191c3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册