Merge branch 'regmap-5.2' into regmap-linus
authorMark Brown <broonie@kernel.org>
Thu, 4 Jul 2019 16:33:56 +0000 (17:33 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 4 Jul 2019 16:33:56 +0000 (17:33 +0100)
drivers/base/regmap/regmap-debugfs.c
drivers/base/regmap/regmap.c

index 263f825..e5e1b3a 100644 (file)
@@ -579,6 +579,8 @@ void regmap_debugfs_init(struct regmap *map, const char *name)
        }
 
        if (!strcmp(name, "dummy")) {
+               kfree(map->debugfs_name);
+
                map->debugfs_name = kasprintf(GFP_KERNEL, "dummy%d",
                                                dummy_index);
                name = map->debugfs_name;
index f102545..19f57cc 100644 (file)
@@ -1637,6 +1637,8 @@ static int _regmap_raw_write_impl(struct regmap *map, unsigned int reg,
                                             map->format.reg_bytes +
                                             map->format.pad_bytes,
                                             val, val_len);
+       else
+               ret = -ENOTSUPP;
 
        /* If that didn't work fall back on linearising by hand. */
        if (ret == -ENOTSUPP) {