aboutsummaryrefslogtreecommitdiffstats
path: root/sound/arm
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-09-01 09:31:50 -0400
committerJaroslav Kysela <perex@perex.cz>2008-09-04 04:33:53 -0400
commit631e8ad428c45ba7ab34df91d1db6cb7bf74d526 (patch)
tree1de9cbc11a4fada0f81b73f151106d886ad323d1 /sound/arm
parentd695e4ea860fc1cbe1e4b101af4e0450219f2db9 (diff)
ALSA: aaci - Fix NULL test at error path
The original fix by Julien Brunel <brunel@diku.dk>. aaci_init_card() returns a pointer with ERR_PTR(), but in aaci_init() NULL is supposed at this error path. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/arm')
-rw-r--r--sound/arm/aaci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
index b0a474494966..89096e811a4b 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -999,7 +999,7 @@ static struct aaci * __devinit aaci_init_card(struct amba_device *dev)
999 card = snd_card_new(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, 999 card = snd_card_new(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
1000 THIS_MODULE, sizeof(struct aaci)); 1000 THIS_MODULE, sizeof(struct aaci));
1001 if (card == NULL) 1001 if (card == NULL)
1002 return ERR_PTR(-ENOMEM); 1002 return NULL;
1003 1003
1004 card->private_free = aaci_free_card; 1004 card->private_free = aaci_free_card;
1005 1005
@@ -1083,8 +1083,8 @@ static int __devinit aaci_probe(struct amba_device *dev, void *id)
1083 return ret; 1083 return ret;
1084 1084
1085 aaci = aaci_init_card(dev); 1085 aaci = aaci_init_card(dev);
1086 if (IS_ERR(aaci)) { 1086 if (!aaci) {
1087 ret = PTR_ERR(aaci); 1087 ret = -ENOMEM;
1088 goto out; 1088 goto out;
1089 } 1089 }
1090 1090