projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2b4c7b
)
ASoC: sta32x: Fix a memory leak if snd_soc_register_codec fails
author
Axel Lin
<axel.lin@gmail.com>
Sat, 13 Aug 2011 03:33:08 +0000
(11:33 +0800)
committer
Mark Brown
<broonie@opensource.wolfsonmicro.com>
Mon, 15 Aug 2011 13:28:52 +0000
(22:28 +0900)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/sta32x.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/sta32x.c
b/sound/soc/codecs/sta32x.c
index 409d89d1f34c26fb44b58d979256541d798a5dc1..fbd7eb9e61ce197ae9c5bb22df308d618f9545eb 100644
(file)
--- a/
sound/soc/codecs/sta32x.c
+++ b/
sound/soc/codecs/sta32x.c
@@
-857,6
+857,7
@@
static __devinit int sta32x_i2c_probe(struct i2c_client *i2c,
ret = snd_soc_register_codec(&i2c->dev, &sta32x_codec, &sta32x_dai, 1);
if (ret != 0) {
dev_err(&i2c->dev, "Failed to register codec (%d)\n", ret);
+ kfree(sta32x);
return ret;
}