regmap: debugfs: Fix more error path regressions
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Fri, 18 Sep 2020 15:22:12 +0000 (16:22 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 21 Sep 2020 23:11:45 +0000 (00:11 +0100)
commit1d512ee861b80da63cbc501b973c53131aa22f29
tree3f3cb1bcf3f1db404643548b51a4793098bce376
parent0c2191c3da345e0fe73118445ddb1f0df114aadf
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: 94cc89eb8fa5 ("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>
drivers/base/regmap/regmap.c