regmap: debugfs: Add back in erroneously removed initialisation of ret
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Fri, 18 Sep 2020 11:20:02 +0000 (12:20 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 18 Sep 2020 11:47:37 +0000 (12:47 +0100)
Fixes: 94cc89eb8fa5 ("regmap: debugfs: Fix handling of name string for debugfs init delays")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200918112002.15216-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap.c

index e22c21a..388ff8a 100644 (file)
@@ -694,9 +694,9 @@ struct regmap *__regmap_init(struct device *dev,
                             const char *lock_name)
 {
        struct regmap *map;
+       int ret = -EINVAL;
        enum regmap_endian reg_endian, val_endian;
        int i, j;
-       int ret;
 
        if (!config)
                goto err;