aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
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 55fdb4abb179..8592d95023ed 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1311,17 +1311,17 @@ int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid)
1311{ 1311{
1312 struct snd_soc_codec *codec = socdev->codec; 1312 struct snd_soc_codec *codec = socdev->codec;
1313 struct snd_soc_card *card = socdev->card; 1313 struct snd_soc_card *card = socdev->card;
1314 int ret = 0, i; 1314 int ret, i;
1315 1315
1316 mutex_lock(&codec->mutex); 1316 mutex_lock(&codec->mutex);
1317 1317
1318 /* register a sound card */ 1318 /* register a sound card */
1319 codec->card = snd_card_new(idx, xid, codec->owner, 0); 1319 ret = snd_card_create(idx, xid, codec->owner, 0, &codec->card);
1320 if (!codec->card) { 1320 if (ret < 0) {
1321 printk(KERN_ERR "asoc: can't create sound card for codec %s\n", 1321 printk(KERN_ERR "asoc: can't create sound card for codec %s\n",
1322 codec->name); 1322 codec->name);
1323 mutex_unlock(&codec->mutex); 1323 mutex_unlock(&codec->mutex);
1324 return -ENODEV; 1324 return ret;
1325 } 1325 }
1326 1326
1327 codec->card->dev = socdev->dev; 1327 codec->card->dev = socdev->dev;