Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 371870
b: refs/heads/master
c: 5acd7df
h: refs/heads/master
v: v3
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Mar 4, 2013
1 parent 747c7a1 commit da20390
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f790b94d7867fb0555f91ae920b9001b42ae38a6
refs/heads/master: 5acd7dfbd7851446fb1d2c947661d365e4c635a0
14 changes: 5 additions & 9 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4086,11 +4086,10 @@ int snd_soc_register_codec(struct device *dev,
mutex_unlock(&client_mutex);

/* register any DAIs */
if (num_dai) {
ret = snd_soc_register_dais(dev, dai_drv, num_dai);
if (ret < 0)
dev_err(codec->dev, "ASoC: Failed to regster"
" DAIs: %d\n", ret);
ret = snd_soc_register_dais(dev, dai_drv, num_dai);
if (ret < 0) {
dev_err(codec->dev, "ASoC: Failed to regster DAIs: %d\n", ret);
goto fail_codec_name;
}

dev_dbg(codec->dev, "ASoC: Registered codec '%s'\n", codec->name);
Expand All @@ -4112,7 +4111,6 @@ EXPORT_SYMBOL_GPL(snd_soc_register_codec);
void snd_soc_unregister_codec(struct device *dev)
{
struct snd_soc_codec *codec;
int i;

list_for_each_entry(codec, &codec_list, list) {
if (dev == codec->dev)
Expand All @@ -4121,9 +4119,7 @@ void snd_soc_unregister_codec(struct device *dev)
return;

found:
if (codec->num_dai)
for (i = 0; i < codec->num_dai; i++)
snd_soc_unregister_dai(dev);
snd_soc_unregister_dais(dev, codec->num_dai);

mutex_lock(&client_mutex);
list_del(&codec->list);
Expand Down

0 comments on commit da20390

Please sign in to comment.