diff options
| -rw-r--r-- | sound/soc/codecs/wm9705.c | 8 | ||||
| -rw-r--r-- | sound/soc/codecs/wm9712.c | 7 |
2 files changed, 4 insertions, 11 deletions
diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c index 68c204e3599f..2c09f71fe433 100644 --- a/sound/soc/codecs/wm9705.c +++ b/sound/soc/codecs/wm9705.c | |||
| @@ -321,7 +321,6 @@ static int wm9705_soc_probe(struct snd_soc_codec *codec) | |||
| 321 | { | 321 | { |
| 322 | struct wm9705_priv *wm9705 = snd_soc_codec_get_drvdata(codec); | 322 | struct wm9705_priv *wm9705 = snd_soc_codec_get_drvdata(codec); |
| 323 | struct regmap *regmap; | 323 | struct regmap *regmap; |
| 324 | int ret; | ||
| 325 | 324 | ||
| 326 | if (wm9705->mfd_pdata) { | 325 | if (wm9705->mfd_pdata) { |
| 327 | wm9705->ac97 = wm9705->mfd_pdata->ac97; | 326 | wm9705->ac97 = wm9705->mfd_pdata->ac97; |
| @@ -337,8 +336,8 @@ static int wm9705_soc_probe(struct snd_soc_codec *codec) | |||
| 337 | 336 | ||
| 338 | regmap = regmap_init_ac97(wm9705->ac97, &wm9705_regmap_config); | 337 | regmap = regmap_init_ac97(wm9705->ac97, &wm9705_regmap_config); |
| 339 | if (IS_ERR(regmap)) { | 338 | if (IS_ERR(regmap)) { |
| 340 | ret = PTR_ERR(regmap); | 339 | snd_soc_free_ac97_codec(wm9705->ac97); |
| 341 | goto err_free_ac97_codec; | 340 | return PTR_ERR(regmap); |
| 342 | } | 341 | } |
| 343 | #endif | 342 | #endif |
| 344 | } | 343 | } |
| @@ -347,9 +346,6 @@ static int wm9705_soc_probe(struct snd_soc_codec *codec) | |||
| 347 | snd_soc_codec_init_regmap(codec, regmap); | 346 | snd_soc_codec_init_regmap(codec, regmap); |
| 348 | 347 | ||
| 349 | return 0; | 348 | return 0; |
| 350 | err_free_ac97_codec: | ||
| 351 | snd_soc_free_ac97_codec(wm9705->ac97); | ||
| 352 | return ret; | ||
| 353 | } | 349 | } |
| 354 | 350 | ||
| 355 | static int wm9705_soc_remove(struct snd_soc_codec *codec) | 351 | static int wm9705_soc_remove(struct snd_soc_codec *codec) |
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index 9db5c7783de5..4f6d1a442bc4 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c | |||
| @@ -656,8 +656,8 @@ static int wm9712_soc_probe(struct snd_soc_codec *codec) | |||
| 656 | 656 | ||
| 657 | regmap = regmap_init_ac97(wm9712->ac97, &wm9712_regmap_config); | 657 | regmap = regmap_init_ac97(wm9712->ac97, &wm9712_regmap_config); |
| 658 | if (IS_ERR(regmap)) { | 658 | if (IS_ERR(regmap)) { |
| 659 | ret = PTR_ERR(regmap); | 659 | snd_soc_free_ac97_codec(wm9712->ac97); |
| 660 | goto err_free_ac97_codec; | 660 | return PTR_ERR(regmap); |
| 661 | } | 661 | } |
| 662 | #endif | 662 | #endif |
| 663 | } | 663 | } |
| @@ -668,9 +668,6 @@ static int wm9712_soc_probe(struct snd_soc_codec *codec) | |||
| 668 | snd_soc_update_bits(codec, AC97_VIDEO, 0x3000, 0x3000); | 668 | snd_soc_update_bits(codec, AC97_VIDEO, 0x3000, 0x3000); |
| 669 | 669 | ||
| 670 | return 0; | 670 | return 0; |
| 671 | err_free_ac97_codec: | ||
| 672 | snd_soc_free_ac97_codec(wm9712->ac97); | ||
| 673 | return ret; | ||
| 674 | } | 671 | } |
| 675 | 672 | ||
| 676 | static int wm9712_soc_remove(struct snd_soc_codec *codec) | 673 | static int wm9712_soc_remove(struct snd_soc_codec *codec) |
