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 | |
parent | 6ce5eecb9cd3ac97b952c50309b87c31488a45e9 (diff) | |
parent | b8e6c91c74e9f0279b7c51048779b3d62da60b88 (diff) |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'sound')
-rw-r--r-- | sound/mips/au1x00.c | 1 | ||||
-rw-r--r-- | sound/pci/ca0106/ca0106_main.c | 5 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 9 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 6 | ||||
-rw-r--r-- | sound/soc/at91/eti_b1_wm8731.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/ak4535.c | 11 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 11 | ||||
-rw-r--r-- | sound/soc/codecs/uda1380.c | 9 | ||||
-rw-r--r-- | sound/soc/codecs/wm8510.c | 9 | ||||
-rw-r--r-- | sound/soc/codecs/wm8731.c | 11 | ||||
-rw-r--r-- | sound/soc/codecs/wm8750.c | 10 | ||||
-rw-r--r-- | sound/soc/codecs/wm8753.c | 12 | ||||
-rw-r--r-- | sound/soc/codecs/wm8990.c | 11 | ||||
-rw-r--r-- | sound/soc/codecs/wm9712.c | 1 |
14 files changed, 66 insertions, 41 deletions
diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c index ee0741f9eb53..fbef38a9604a 100644 --- a/sound/mips/au1x00.c +++ b/sound/mips/au1x00.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <linux/interrupt.h> | 38 | #include <linux/interrupt.h> |
39 | #include <linux/init.h> | 39 | #include <linux/init.h> |
40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
41 | #include <linux/version.h> | ||
42 | #include <sound/core.h> | 41 | #include <sound/core.h> |
43 | #include <sound/initval.h> | 42 | #include <sound/initval.h> |
44 | #include <sound/pcm.h> | 43 | #include <sound/pcm.h> |
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 2f8b28add276..6abe8a3bd365 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
@@ -249,11 +249,12 @@ static struct snd_ca0106_details ca0106_chip_details[] = { | |||
249 | .name = "MSI K8N Diamond MB [SB0438]", | 249 | .name = "MSI K8N Diamond MB [SB0438]", |
250 | .gpio_type = 2, | 250 | .gpio_type = 2, |
251 | .i2c_adc = 1 } , | 251 | .i2c_adc = 1 } , |
252 | /* Another MSI K8N Diamond MB, which has apprently a different SSID */ | 252 | /* MSI K8N Diamond PLUS MB */ |
253 | { .serial = 0x10091102, | 253 | { .serial = 0x10091102, |
254 | .name = "MSI K8N Diamond MB", | 254 | .name = "MSI K8N Diamond MB", |
255 | .gpio_type = 2, | 255 | .gpio_type = 2, |
256 | .i2c_adc = 1 } , | 256 | .i2c_adc = 1, |
257 | .spi_dac = 2 }, | ||
257 | /* Shuttle XPC SD31P which has an onboard Creative Labs | 258 | /* Shuttle XPC SD31P which has an onboard Creative Labs |
258 | * Sound Blaster Live! 24-bit EAX | 259 | * Sound Blaster Live! 24-bit EAX |
259 | * high-definition 7.1 audio processor". | 260 | * high-definition 7.1 audio processor". |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index a73d6ca0a906..1c53e337ecb2 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -278,6 +278,9 @@ enum { | |||
278 | /* Defines for Nvidia HDA support */ | 278 | /* Defines for Nvidia HDA support */ |
279 | #define NVIDIA_HDA_TRANSREG_ADDR 0x4e | 279 | #define NVIDIA_HDA_TRANSREG_ADDR 0x4e |
280 | #define NVIDIA_HDA_ENABLE_COHBITS 0x0f | 280 | #define NVIDIA_HDA_ENABLE_COHBITS 0x0f |
281 | #define NVIDIA_HDA_ISTRM_COH 0x4d | ||
282 | #define NVIDIA_HDA_OSTRM_COH 0x4c | ||
283 | #define NVIDIA_HDA_ENABLE_COHBIT 0x01 | ||
281 | 284 | ||
282 | /* Defines for Intel SCH HDA snoop control */ | 285 | /* Defines for Intel SCH HDA snoop control */ |
283 | #define INTEL_SCH_HDA_DEVC 0x78 | 286 | #define INTEL_SCH_HDA_DEVC 0x78 |
@@ -900,6 +903,12 @@ static void azx_init_pci(struct azx *chip) | |||
900 | update_pci_byte(chip->pci, | 903 | update_pci_byte(chip->pci, |
901 | NVIDIA_HDA_TRANSREG_ADDR, | 904 | NVIDIA_HDA_TRANSREG_ADDR, |
902 | 0x0f, NVIDIA_HDA_ENABLE_COHBITS); | 905 | 0x0f, NVIDIA_HDA_ENABLE_COHBITS); |
906 | update_pci_byte(chip->pci, | ||
907 | NVIDIA_HDA_ISTRM_COH, | ||
908 | 0x01, NVIDIA_HDA_ENABLE_COHBIT); | ||
909 | update_pci_byte(chip->pci, | ||
910 | NVIDIA_HDA_OSTRM_COH, | ||
911 | 0x01, NVIDIA_HDA_ENABLE_COHBIT); | ||
903 | break; | 912 | break; |
904 | case AZX_DRIVER_SCH: | 913 | case AZX_DRIVER_SCH: |
905 | pci_read_config_word(chip->pci, INTEL_SCH_HDA_DEVC, &snoop); | 914 | pci_read_config_word(chip->pci, INTEL_SCH_HDA_DEVC, &snoop); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index b80e725432f0..909f1c101c95 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -952,7 +952,7 @@ do_sku: | |||
952 | tmp | 0x2010); | 952 | tmp | 0x2010); |
953 | break; | 953 | break; |
954 | case 0x10ec0888: | 954 | case 0x10ec0888: |
955 | alc888_coef_init(codec); | 955 | /*alc888_coef_init(codec);*/ /* called in alc_init() */ |
956 | break; | 956 | break; |
957 | case 0x10ec0267: | 957 | case 0x10ec0267: |
958 | case 0x10ec0268: | 958 | case 0x10ec0268: |
@@ -2439,6 +2439,8 @@ static int alc_init(struct hda_codec *codec) | |||
2439 | unsigned int i; | 2439 | unsigned int i; |
2440 | 2440 | ||
2441 | alc_fix_pll(codec); | 2441 | alc_fix_pll(codec); |
2442 | if (codec->vendor_id == 0x10ec0888) | ||
2443 | alc888_coef_init(codec); | ||
2442 | 2444 | ||
2443 | for (i = 0; i < spec->num_init_verbs; i++) | 2445 | for (i = 0; i < spec->num_init_verbs; i++) |
2444 | snd_hda_sequence_write(codec, spec->init_verbs[i]); | 2446 | snd_hda_sequence_write(codec, spec->init_verbs[i]); |
@@ -8426,8 +8428,6 @@ static int patch_alc883(struct hda_codec *codec) | |||
8426 | codec->patch_ops = alc_patch_ops; | 8428 | codec->patch_ops = alc_patch_ops; |
8427 | if (board_config == ALC883_AUTO) | 8429 | if (board_config == ALC883_AUTO) |
8428 | spec->init_hook = alc883_auto_init; | 8430 | spec->init_hook = alc883_auto_init; |
8429 | else if (codec->vendor_id == 0x10ec0888) | ||
8430 | spec->init_hook = alc888_coef_init; | ||
8431 | 8431 | ||
8432 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 8432 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
8433 | if (!spec->loopback.amplist) | 8433 | if (!spec->loopback.amplist) |
diff --git a/sound/soc/at91/eti_b1_wm8731.c b/sound/soc/at91/eti_b1_wm8731.c index b081e83766b7..b81d6b2cfa1d 100644 --- a/sound/soc/at91/eti_b1_wm8731.c +++ b/sound/soc/at91/eti_b1_wm8731.c | |||
@@ -22,7 +22,6 @@ | |||
22 | 22 | ||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/moduleparam.h> | 24 | #include <linux/moduleparam.h> |
25 | #include <linux/version.h> | ||
26 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
27 | #include <linux/clk.h> | 26 | #include <linux/clk.h> |
28 | #include <linux/timer.h> | 27 | #include <linux/timer.h> |
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c index b26003c4f3e8..7da9f467b7b8 100644 --- a/sound/soc/codecs/ak4535.c +++ b/sound/soc/codecs/ak4535.c | |||
@@ -562,10 +562,9 @@ static int ak4535_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
562 | client_template.addr = addr; | 562 | client_template.addr = addr; |
563 | 563 | ||
564 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 564 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
565 | if (i2c == NULL) { | 565 | if (i2c == NULL) |
566 | kfree(codec); | ||
567 | return -ENOMEM; | 566 | return -ENOMEM; |
568 | } | 567 | |
569 | i2c_set_clientdata(i2c, codec); | 568 | i2c_set_clientdata(i2c, codec); |
570 | codec->control_data = i2c; | 569 | codec->control_data = i2c; |
571 | 570 | ||
@@ -583,7 +582,6 @@ static int ak4535_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
583 | return ret; | 582 | return ret; |
584 | 583 | ||
585 | err: | 584 | err: |
586 | kfree(codec); | ||
587 | kfree(i2c); | 585 | kfree(i2c); |
588 | return ret; | 586 | return ret; |
589 | } | 587 | } |
@@ -660,6 +658,11 @@ static int ak4535_probe(struct platform_device *pdev) | |||
660 | #else | 658 | #else |
661 | /* Add other interfaces here */ | 659 | /* Add other interfaces here */ |
662 | #endif | 660 | #endif |
661 | |||
662 | if (ret != 0) { | ||
663 | kfree(codec->private_data); | ||
664 | kfree(codec); | ||
665 | } | ||
663 | return ret; | 666 | return ret; |
664 | } | 667 | } |
665 | 668 | ||
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index b1dce5f459db..5f9abb199435 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -1199,10 +1199,9 @@ static int aic3x_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
1199 | client_template.addr = addr; | 1199 | client_template.addr = addr; |
1200 | 1200 | ||
1201 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 1201 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
1202 | if (i2c == NULL) { | 1202 | if (i2c == NULL) |
1203 | kfree(codec); | ||
1204 | return -ENOMEM; | 1203 | return -ENOMEM; |
1205 | } | 1204 | |
1206 | i2c_set_clientdata(i2c, codec); | 1205 | i2c_set_clientdata(i2c, codec); |
1207 | codec->control_data = i2c; | 1206 | codec->control_data = i2c; |
1208 | 1207 | ||
@@ -1221,7 +1220,6 @@ static int aic3x_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
1221 | return ret; | 1220 | return ret; |
1222 | 1221 | ||
1223 | err: | 1222 | err: |
1224 | kfree(codec); | ||
1225 | kfree(i2c); | 1223 | kfree(i2c); |
1226 | return ret; | 1224 | return ret; |
1227 | } | 1225 | } |
@@ -1302,6 +1300,11 @@ static int aic3x_probe(struct platform_device *pdev) | |||
1302 | #else | 1300 | #else |
1303 | /* Add other interfaces here */ | 1301 | /* Add other interfaces here */ |
1304 | #endif | 1302 | #endif |
1303 | |||
1304 | if (ret != 0) { | ||
1305 | kfree(codec->private_data); | ||
1306 | kfree(codec); | ||
1307 | } | ||
1305 | return ret; | 1308 | return ret; |
1306 | } | 1309 | } |
1307 | 1310 | ||
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index a52d6d9e007a..807318fbdc8f 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c | |||
@@ -729,10 +729,9 @@ static int uda1380_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
729 | client_template.addr = addr; | 729 | client_template.addr = addr; |
730 | 730 | ||
731 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 731 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
732 | if (i2c == NULL) { | 732 | if (i2c == NULL) |
733 | kfree(codec); | ||
734 | return -ENOMEM; | 733 | return -ENOMEM; |
735 | } | 734 | |
736 | i2c_set_clientdata(i2c, codec); | 735 | i2c_set_clientdata(i2c, codec); |
737 | codec->control_data = i2c; | 736 | codec->control_data = i2c; |
738 | 737 | ||
@@ -750,7 +749,6 @@ static int uda1380_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
750 | return ret; | 749 | return ret; |
751 | 750 | ||
752 | err: | 751 | err: |
753 | kfree(codec); | ||
754 | kfree(i2c); | 752 | kfree(i2c); |
755 | return ret; | 753 | return ret; |
756 | } | 754 | } |
@@ -817,6 +815,9 @@ static int uda1380_probe(struct platform_device *pdev) | |||
817 | #else | 815 | #else |
818 | /* Add other interfaces here */ | 816 | /* Add other interfaces here */ |
819 | #endif | 817 | #endif |
818 | |||
819 | if (ret != 0) | ||
820 | kfree(codec); | ||
820 | return ret; | 821 | return ret; |
821 | } | 822 | } |
822 | 823 | ||
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c index 67325fd95447..3d998e6a997e 100644 --- a/sound/soc/codecs/wm8510.c +++ b/sound/soc/codecs/wm8510.c | |||
@@ -693,10 +693,9 @@ static int wm8510_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
693 | client_template.addr = addr; | 693 | client_template.addr = addr; |
694 | 694 | ||
695 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 695 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
696 | if (i2c == NULL) { | 696 | if (i2c == NULL) |
697 | kfree(codec); | ||
698 | return -ENOMEM; | 697 | return -ENOMEM; |
699 | } | 698 | |
700 | i2c_set_clientdata(i2c, codec); | 699 | i2c_set_clientdata(i2c, codec); |
701 | codec->control_data = i2c; | 700 | codec->control_data = i2c; |
702 | 701 | ||
@@ -714,7 +713,6 @@ static int wm8510_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
714 | return ret; | 713 | return ret; |
715 | 714 | ||
716 | err: | 715 | err: |
717 | kfree(codec); | ||
718 | kfree(i2c); | 716 | kfree(i2c); |
719 | return ret; | 717 | return ret; |
720 | } | 718 | } |
@@ -782,6 +780,9 @@ static int wm8510_probe(struct platform_device *pdev) | |||
782 | #else | 780 | #else |
783 | /* Add other interfaces here */ | 781 | /* Add other interfaces here */ |
784 | #endif | 782 | #endif |
783 | |||
784 | if (ret != 0) | ||
785 | kfree(codec); | ||
785 | return ret; | 786 | return ret; |
786 | } | 787 | } |
787 | 788 | ||
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 369d39c3f745..9402fcaf04fa 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
@@ -596,10 +596,9 @@ static int wm8731_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
596 | client_template.addr = addr; | 596 | client_template.addr = addr; |
597 | 597 | ||
598 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 598 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
599 | if (i2c == NULL) { | 599 | if (i2c == NULL) |
600 | kfree(codec); | ||
601 | return -ENOMEM; | 600 | return -ENOMEM; |
602 | } | 601 | |
603 | i2c_set_clientdata(i2c, codec); | 602 | i2c_set_clientdata(i2c, codec); |
604 | codec->control_data = i2c; | 603 | codec->control_data = i2c; |
605 | 604 | ||
@@ -617,7 +616,6 @@ static int wm8731_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
617 | return ret; | 616 | return ret; |
618 | 617 | ||
619 | err: | 618 | err: |
620 | kfree(codec); | ||
621 | kfree(i2c); | 619 | kfree(i2c); |
622 | return ret; | 620 | return ret; |
623 | } | 621 | } |
@@ -693,6 +691,11 @@ static int wm8731_probe(struct platform_device *pdev) | |||
693 | #else | 691 | #else |
694 | /* Add other interfaces here */ | 692 | /* Add other interfaces here */ |
695 | #endif | 693 | #endif |
694 | |||
695 | if (ret != 0) { | ||
696 | kfree(codec->private_data); | ||
697 | kfree(codec); | ||
698 | } | ||
696 | return ret; | 699 | return ret; |
697 | } | 700 | } |
698 | 701 | ||
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 | ||
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index 8604809f0c36..5761164fe16d 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c | |||
@@ -34,7 +34,6 @@ | |||
34 | 34 | ||
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/moduleparam.h> | 36 | #include <linux/moduleparam.h> |
37 | #include <linux/version.h> | ||
38 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
39 | #include <linux/init.h> | 38 | #include <linux/init.h> |
40 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
@@ -1661,10 +1660,9 @@ static int wm8753_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
1661 | client_template.addr = addr; | 1660 | client_template.addr = addr; |
1662 | 1661 | ||
1663 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 1662 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
1664 | if (!i2c) { | 1663 | if (!i2c) |
1665 | kfree(codec); | ||
1666 | return -ENOMEM; | 1664 | return -ENOMEM; |
1667 | } | 1665 | |
1668 | i2c_set_clientdata(i2c, codec); | 1666 | i2c_set_clientdata(i2c, codec); |
1669 | codec->control_data = i2c; | 1667 | codec->control_data = i2c; |
1670 | 1668 | ||
@@ -1683,7 +1681,6 @@ static int wm8753_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
1683 | return ret; | 1681 | return ret; |
1684 | 1682 | ||
1685 | err: | 1683 | err: |
1686 | kfree(codec); | ||
1687 | kfree(i2c); | 1684 | kfree(i2c); |
1688 | return ret; | 1685 | return ret; |
1689 | } | 1686 | } |
@@ -1760,6 +1757,11 @@ static int wm8753_probe(struct platform_device *pdev) | |||
1760 | #else | 1757 | #else |
1761 | /* Add other interfaces here */ | 1758 | /* Add other interfaces here */ |
1762 | #endif | 1759 | #endif |
1760 | |||
1761 | if (ret != 0) { | ||
1762 | kfree(codec->private_data); | ||
1763 | kfree(codec); | ||
1764 | } | ||
1763 | return ret; | 1765 | return ret; |
1764 | } | 1766 | } |
1765 | 1767 | ||
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index e44153fa38de..dd995ef448b4 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
@@ -1500,10 +1500,9 @@ static int wm8990_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
1500 | client_template.addr = addr; | 1500 | client_template.addr = addr; |
1501 | 1501 | ||
1502 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 1502 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
1503 | if (i2c == NULL) { | 1503 | if (i2c == NULL) |
1504 | kfree(codec); | ||
1505 | return -ENOMEM; | 1504 | return -ENOMEM; |
1506 | } | 1505 | |
1507 | i2c_set_clientdata(i2c, codec); | 1506 | i2c_set_clientdata(i2c, codec); |
1508 | codec->control_data = i2c; | 1507 | codec->control_data = i2c; |
1509 | 1508 | ||
@@ -1521,7 +1520,6 @@ static int wm8990_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
1521 | return ret; | 1520 | return ret; |
1522 | 1521 | ||
1523 | err: | 1522 | err: |
1524 | kfree(codec); | ||
1525 | kfree(i2c); | 1523 | kfree(i2c); |
1526 | return ret; | 1524 | return ret; |
1527 | } | 1525 | } |
@@ -1595,6 +1593,11 @@ static int wm8990_probe(struct platform_device *pdev) | |||
1595 | #else | 1593 | #else |
1596 | /* Add other interfaces here */ | 1594 | /* Add other interfaces here */ |
1597 | #endif | 1595 | #endif |
1596 | |||
1597 | if (ret != 0) { | ||
1598 | kfree(codec->private_data); | ||
1599 | kfree(codec); | ||
1600 | } | ||
1598 | return ret; | 1601 | return ret; |
1599 | } | 1602 | } |
1600 | 1603 | ||
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index 1fb7f9a7aecd..2f1c91b1d556 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/version.h> | ||
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/device.h> | 17 | #include <linux/device.h> |
19 | #include <sound/core.h> | 18 | #include <sound/core.h> |