aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-01-28 08:08:32 +0100
committerTakashi Iwai <tiwai@suse.de>2009-01-28 08:08:32 +0100
commit67fcdead3c7424d51e7108c220c9ab1a5e752ed3 (patch)
tree3c48fabced8e519ef3f83209a793dfea48dbbfa8 /sound/soc/soc-core.c
parent006f367e38fb45e2f161c0f500c74449ae63e866 (diff)
parentb1a0aac05f044e78a589bfd7a9e2334aa640eb45 (diff)
Merge branch 'topic/snd_card_new-err' into topic/asoc
Conflicts: sound/soc/soc-core.c
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index f18c7a3e36d..580a1a534ad 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1308,17 +1308,17 @@ int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid)
{
struct snd_soc_card *card = socdev->card;
struct snd_soc_codec *codec = card->codec;
- int ret = 0, i;
+ int ret, i;
mutex_lock(&codec->mutex);
/* register a sound card */
- codec->card = snd_card_new(idx, xid, codec->owner, 0);
- if (!codec->card) {
+ ret = snd_card_create(idx, xid, codec->owner, 0, &codec->card);
+ if (ret < 0) {
printk(KERN_ERR "asoc: can't create sound card for codec %s\n",
codec->name);
mutex_unlock(&codec->mutex);
- return -ENODEV;
+ return ret;
}
codec->card->dev = socdev->dev;