Commit a7ace561 authored by Mark Brown's avatar Mark Brown

Merge branch 'regmap-linus' into regmap-next

parents fec4fe26 5204f5e3
...@@ -198,15 +198,13 @@ struct regmap *regmap_init(struct device *dev, ...@@ -198,15 +198,13 @@ struct regmap *regmap_init(struct device *dev,
map->work_buf = kmalloc(map->format.buf_size, GFP_KERNEL); map->work_buf = kmalloc(map->format.buf_size, GFP_KERNEL);
if (map->work_buf == NULL) { if (map->work_buf == NULL) {
ret = -ENOMEM; ret = -ENOMEM;
goto err_bus; goto err_map;
} }
regmap_debugfs_init(map); regmap_debugfs_init(map);
return map; return map;
err_bus:
module_put(map->bus->owner);
err_map: err_map:
kfree(map); kfree(map);
err: err:
...@@ -221,7 +219,6 @@ void regmap_exit(struct regmap *map) ...@@ -221,7 +219,6 @@ void regmap_exit(struct regmap *map)
{ {
regmap_debugfs_exit(map); regmap_debugfs_exit(map);
kfree(map->work_buf); kfree(map->work_buf);
module_put(map->bus->owner);
kfree(map); kfree(map);
} }
EXPORT_SYMBOL_GPL(regmap_exit); EXPORT_SYMBOL_GPL(regmap_exit);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment