diff options
Diffstat (limited to 'drivers/base/regmap/regmap.c')
-rw-r--r-- | drivers/base/regmap/regmap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 3e30d168eb1d..b08df85cedff 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -229,12 +229,14 @@ struct regmap *regmap_init(struct device *dev, ret = regcache_init(map); if (ret < 0) - goto err_map; + goto err_free_workbuf; regmap_debugfs_init(map); return map; +err_free_workbuf: + kfree(map->work_buf); err_map: kfree(map); err: |