Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283861
b: refs/heads/master
c: b03e96e
h: refs/heads/master
i:
  283859: 7328785
v: v3
  • Loading branch information
Mark Brown committed Dec 3, 2011
1 parent a4916e8 commit 0024dc6
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 6cd4eb959294990cbf38051fd9ab1e9091b3e926
refs/heads/master: b03e96e4d619183cbe9aea55f2340596c1fecf64
10 changes: 5 additions & 5 deletions trunk/sound/soc/codecs/wm2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,8 @@ static int __devinit wm2000_i2c_probe(struct i2c_client *i2c,
return -EINVAL;
}

wm2000 = kzalloc(sizeof(struct wm2000_priv), GFP_KERNEL);
wm2000 = devm_kzalloc(&i2c->dev, sizeof(struct wm2000_priv),
GFP_KERNEL);
if (wm2000 == NULL) {
dev_err(&i2c->dev, "Unable to allocate private data\n");
return -ENOMEM;
Expand Down Expand Up @@ -779,7 +780,9 @@ static int __devinit wm2000_i2c_probe(struct i2c_client *i2c,

/* Pre-cook the concatenation of the register address onto the image */
wm2000->anc_download_size = fw->size + 2;
wm2000->anc_download = kmalloc(wm2000->anc_download_size, GFP_KERNEL);
wm2000->anc_download = devm_kzalloc(&i2c->dev,
wm2000->anc_download_size,
GFP_KERNEL);
if (wm2000->anc_download == NULL) {
dev_err(&i2c->dev, "Out of memory\n");
ret = -ENOMEM;
Expand Down Expand Up @@ -810,7 +813,6 @@ static int __devinit wm2000_i2c_probe(struct i2c_client *i2c,
err_fw:
release_firmware(fw);
err:
kfree(wm2000);
return ret;
}

Expand All @@ -821,8 +823,6 @@ static __devexit int wm2000_i2c_remove(struct i2c_client *i2c)
wm2000_anc_transition(wm2000, ANC_OFF);

wm2000_i2c = NULL;
kfree(wm2000->anc_download);
kfree(wm2000);

return 0;
}
Expand Down

0 comments on commit 0024dc6

Please sign in to comment.