Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283781
b: refs/heads/master
c: a81b82c
h: refs/heads/master
i:
  283779: c0ae55b
v: v3
  • Loading branch information
Mark Brown committed Nov 25, 2011
1 parent 6cc4976 commit 4403ddf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: 878042d19c760178ba08ed24025d08ba750e38c3
refs/heads/master: a81b82c09e70db853cb270ed9ac166b6c50d7b8c
9 changes: 4 additions & 5 deletions trunk/sound/soc/codecs/wm5100.c
Original file line number Diff line number Diff line change
Expand Up @@ -2607,7 +2607,8 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
unsigned int reg;
int ret, i;

wm5100 = kzalloc(sizeof(struct wm5100_priv), GFP_KERNEL);
wm5100 = devm_kzalloc(&i2c->dev, sizeof(struct wm5100_priv),
GFP_KERNEL);
if (wm5100 == NULL)
return -ENOMEM;

Expand All @@ -2616,7 +2617,7 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
ret = PTR_ERR(wm5100->regmap);
dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
ret);
goto err_alloc;
goto err;
}

for (i = 0; i < ARRAY_SIZE(wm5100->fll); i++)
Expand Down Expand Up @@ -2774,8 +2775,7 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
wm5100->core_supplies);
err_regmap:
regmap_exit(wm5100->regmap);
err_alloc:
kfree(wm5100);
err:
return ret;
}

Expand All @@ -2799,7 +2799,6 @@ static __devexit int wm5100_i2c_remove(struct i2c_client *client)
regulator_bulk_free(ARRAY_SIZE(wm5100->core_supplies),
wm5100->core_supplies);
regmap_exit(wm5100->regmap);
kfree(wm5100);

return 0;
}
Expand Down

0 comments on commit 4403ddf

Please sign in to comment.