diff options
Diffstat (limited to 'sound/soc/codecs/tlv320aic23.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic23.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index 90a0264f7538..a9dc5fb54774 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c | |||
@@ -85,7 +85,7 @@ static int tlv320aic23_write(struct snd_soc_codec *codec, unsigned int reg, | |||
85 | * of data into val | 85 | * of data into val |
86 | */ | 86 | */ |
87 | 87 | ||
88 | if ((reg < 0 || reg > 9) && (reg != 15)) { | 88 | if (reg > 9 && reg != 15) { |
89 | printk(KERN_WARNING "%s Invalid register R%u\n", __func__, reg); | 89 | printk(KERN_WARNING "%s Invalid register R%u\n", __func__, reg); |
90 | return -1; | 90 | return -1; |
91 | } | 91 | } |
@@ -395,7 +395,6 @@ static int tlv320aic23_add_widgets(struct snd_soc_codec *codec) | |||
395 | /* set up audio path interconnects */ | 395 | /* set up audio path interconnects */ |
396 | snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); | 396 | snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); |
397 | 397 | ||
398 | snd_soc_dapm_new_widgets(codec); | ||
399 | return 0; | 398 | return 0; |
400 | } | 399 | } |
401 | 400 | ||
@@ -706,17 +705,9 @@ static int tlv320aic23_init(struct snd_soc_device *socdev) | |||
706 | snd_soc_add_controls(codec, tlv320aic23_snd_controls, | 705 | snd_soc_add_controls(codec, tlv320aic23_snd_controls, |
707 | ARRAY_SIZE(tlv320aic23_snd_controls)); | 706 | ARRAY_SIZE(tlv320aic23_snd_controls)); |
708 | tlv320aic23_add_widgets(codec); | 707 | tlv320aic23_add_widgets(codec); |
709 | ret = snd_soc_init_card(socdev); | ||
710 | if (ret < 0) { | ||
711 | printk(KERN_ERR "tlv320aic23: failed to register card\n"); | ||
712 | goto card_err; | ||
713 | } | ||
714 | 708 | ||
715 | return ret; | 709 | return ret; |
716 | 710 | ||
717 | card_err: | ||
718 | snd_soc_free_pcms(socdev); | ||
719 | snd_soc_dapm_free(socdev); | ||
720 | pcm_err: | 711 | pcm_err: |
721 | kfree(codec->reg_cache); | 712 | kfree(codec->reg_cache); |
722 | return ret; | 713 | return ret; |