Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280540
b: refs/heads/master
c: bd061c7
h: refs/heads/master
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Nov 14, 2011
1 parent d0e7990 commit e3c5efb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 021cd616decb4e8a4b31f1f8c466a847e8c04e67
refs/heads/master: bd061c78cabc28bb64ed79f784d24918b6bdb791
11 changes: 10 additions & 1 deletion trunk/drivers/base/regmap/regcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,18 @@ int regcache_init(struct regmap *map)
if (map->cache_ops->init) {
dev_dbg(map->dev, "Initializing %s cache\n",
map->cache_ops->name);
return map->cache_ops->init(map);
ret = map->cache_ops->init(map);
if (ret)
goto err_free;
}
return 0;

err_free:
kfree(map->reg_defaults);
if (map->cache_free)
kfree(map->reg_defaults_raw);

return ret;
}

void regcache_exit(struct regmap *map)
Expand Down

0 comments on commit e3c5efb

Please sign in to comment.