diff options
-rw-r--r-- | sound/soc/soc-core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 5720dbcefbc4..2b1fcae4131e 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1609,7 +1609,7 @@ static int soc_probe_aux_dev(struct snd_soc_card *card, int num) | |||
1609 | struct snd_soc_pcm_runtime *rtd = &card->rtd_aux[num]; | 1609 | struct snd_soc_pcm_runtime *rtd = &card->rtd_aux[num]; |
1610 | struct snd_soc_codec *codec; | 1610 | struct snd_soc_codec *codec; |
1611 | const char *temp; | 1611 | const char *temp; |
1612 | int ret = 0; | 1612 | int ret = -ENODEV; |
1613 | 1613 | ||
1614 | /* find CODEC from registered CODECs*/ | 1614 | /* find CODEC from registered CODECs*/ |
1615 | list_for_each_entry(codec, &codec_list, list) { | 1615 | list_for_each_entry(codec, &codec_list, list) { |
@@ -1620,10 +1620,14 @@ static int soc_probe_aux_dev(struct snd_soc_card *card, int num) | |||
1620 | ret = -EBUSY; | 1620 | ret = -EBUSY; |
1621 | goto out; | 1621 | goto out; |
1622 | } | 1622 | } |
1623 | break; | 1623 | goto found; |
1624 | } | 1624 | } |
1625 | } | 1625 | } |
1626 | /* codec not found */ | ||
1627 | dev_err(card->dev, "asoc: codec %s not found", aux_dev->codec_name); | ||
1628 | goto out; | ||
1626 | 1629 | ||
1630 | found: | ||
1627 | if (!try_module_get(codec->dev->driver->owner)) | 1631 | if (!try_module_get(codec->dev->driver->owner)) |
1628 | return -ENODEV; | 1632 | return -ENODEV; |
1629 | 1633 | ||