diff options
author | Steve French <sfrench@us.ibm.com> | 2008-08-26 12:56:05 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-08-26 12:56:05 -0400 |
commit | 3dae49abef945c55c10fa7c479cfd8fd13af55db (patch) | |
tree | 487c47c6d23cc28a259b913396aeaff0b792d32d /sound/soc/codecs/wm8750.c | |
parent | 6ce5eecb9cd3ac97b952c50309b87c31488a45e9 (diff) | |
parent | b8e6c91c74e9f0279b7c51048779b3d62da60b88 (diff) |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'sound/soc/codecs/wm8750.c')
-rw-r--r-- | sound/soc/codecs/wm8750.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index c6a8edf302ad..dd1f55404b29 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c | |||
@@ -869,10 +869,9 @@ static int wm8750_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
869 | client_template.addr = addr; | 869 | client_template.addr = addr; |
870 | 870 | ||
871 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 871 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
872 | if (i2c == NULL) { | 872 | if (i2c == NULL) |
873 | kfree(codec); | ||
874 | return -ENOMEM; | 873 | return -ENOMEM; |
875 | } | 874 | |
876 | i2c_set_clientdata(i2c, codec); | 875 | i2c_set_clientdata(i2c, codec); |
877 | codec->control_data = i2c; | 876 | codec->control_data = i2c; |
878 | 877 | ||
@@ -890,7 +889,6 @@ static int wm8750_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
890 | return ret; | 889 | return ret; |
891 | 890 | ||
892 | err: | 891 | err: |
893 | kfree(codec); | ||
894 | kfree(i2c); | 892 | kfree(i2c); |
895 | return ret; | 893 | return ret; |
896 | } | 894 | } |
@@ -966,6 +964,10 @@ static int wm8750_probe(struct platform_device *pdev) | |||
966 | /* Add other interfaces here */ | 964 | /* Add other interfaces here */ |
967 | #endif | 965 | #endif |
968 | 966 | ||
967 | if (ret != 0) { | ||
968 | kfree(codec->private_data); | ||
969 | kfree(codec); | ||
970 | } | ||
969 | return ret; | 971 | return ret; |
970 | } | 972 | } |
971 | 973 | ||