Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280539
b: refs/heads/master
c: 021cd61
h: refs/heads/master
i:
  280537: 765bd49
  280535: fe23510
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Nov 14, 2011
1 parent 4682a7c commit d0e7990
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: abbb18fb4ad7472ee2e1351f0ca12bce64cac143
refs/heads/master: 021cd616decb4e8a4b31f1f8c466a847e8c04e67
12 changes: 10 additions & 2 deletions trunk/drivers/base/regmap/regcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ static int regcache_hw_init(struct regmap *map)

map->reg_defaults = kmalloc(count * sizeof(struct reg_default),
GFP_KERNEL);
if (!map->reg_defaults)
return -ENOMEM;
if (!map->reg_defaults) {
ret = -ENOMEM;
goto err_free;
}

/* fill the reg_defaults */
map->num_reg_defaults = count;
Expand All @@ -77,6 +79,12 @@ static int regcache_hw_init(struct regmap *map)
}

return 0;

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

return ret;
}

int regcache_init(struct regmap *map)
Expand Down

0 comments on commit d0e7990

Please sign in to comment.