diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-16 17:11:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-16 17:11:43 -0400 |
commit | 2e57572a50a4de41c6cbc879a4866a312d4cd316 (patch) | |
tree | c4f58ec96c06642c4b415b881d3f0a3b673d5b44 /sound/soc/codecs/uda1380.c | |
parent | 9b2e43ae4e9609f80034dfe8de895045cac52d77 (diff) | |
parent | f948cc6ab9e61a8e88d70ee9aafc690e6d26f92c (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Conflicts:
arch/sparc64/kernel/pci_psycho.c
Diffstat (limited to 'sound/soc/codecs/uda1380.c')
-rw-r--r-- | sound/soc/codecs/uda1380.c | 9 |
1 files changed, 5 insertions, 4 deletions
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 | ||