diff options
Diffstat (limited to 'sound/soc/codecs/wm8750.c')
-rw-r--r-- | sound/soc/codecs/wm8750.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index e23cb09f0d14..dd1f55404b29 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c | |||
@@ -348,8 +348,9 @@ static const struct snd_soc_dapm_widget wm8750_dapm_widgets[] = { | |||
348 | SND_SOC_DAPM_OUTPUT("ROUT1"), | 348 | SND_SOC_DAPM_OUTPUT("ROUT1"), |
349 | SND_SOC_DAPM_OUTPUT("LOUT2"), | 349 | SND_SOC_DAPM_OUTPUT("LOUT2"), |
350 | SND_SOC_DAPM_OUTPUT("ROUT2"), | 350 | SND_SOC_DAPM_OUTPUT("ROUT2"), |
351 | SND_SOC_DAPM_OUTPUT("MONO"), | 351 | SND_SOC_DAPM_OUTPUT("MONO1"), |
352 | SND_SOC_DAPM_OUTPUT("OUT3"), | 352 | SND_SOC_DAPM_OUTPUT("OUT3"), |
353 | SND_SOC_DAPM_OUTPUT("VREF"), | ||
353 | 354 | ||
354 | SND_SOC_DAPM_INPUT("LINPUT1"), | 355 | SND_SOC_DAPM_INPUT("LINPUT1"), |
355 | SND_SOC_DAPM_INPUT("LINPUT2"), | 356 | SND_SOC_DAPM_INPUT("LINPUT2"), |
@@ -868,10 +869,9 @@ static int wm8750_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
868 | client_template.addr = addr; | 869 | client_template.addr = addr; |
869 | 870 | ||
870 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 871 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
871 | if (i2c == NULL) { | 872 | if (i2c == NULL) |
872 | kfree(codec); | ||
873 | return -ENOMEM; | 873 | return -ENOMEM; |
874 | } | 874 | |
875 | i2c_set_clientdata(i2c, codec); | 875 | i2c_set_clientdata(i2c, codec); |
876 | codec->control_data = i2c; | 876 | codec->control_data = i2c; |
877 | 877 | ||
@@ -889,7 +889,6 @@ static int wm8750_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
889 | return ret; | 889 | return ret; |
890 | 890 | ||
891 | err: | 891 | err: |
892 | kfree(codec); | ||
893 | kfree(i2c); | 892 | kfree(i2c); |
894 | return ret; | 893 | return ret; |
895 | } | 894 | } |
@@ -965,6 +964,10 @@ static int wm8750_probe(struct platform_device *pdev) | |||
965 | /* Add other interfaces here */ | 964 | /* Add other interfaces here */ |
966 | #endif | 965 | #endif |
967 | 966 | ||
967 | if (ret != 0) { | ||
968 | kfree(codec->private_data); | ||
969 | kfree(codec); | ||
970 | } | ||
968 | return ret; | 971 | return ret; |
969 | } | 972 | } |
970 | 973 | ||