summaryrefslogtreecommitdiff
path: root/sound/arm/aaci.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-09-01 17:31:50 +0400
committerJaroslav Kysela <perex@perex.cz>2008-09-04 12:33:53 +0400
commit631e8ad428c45ba7ab34df91d1db6cb7bf74d526 (patch)
tree1de9cbc11a4fada0f81b73f151106d886ad323d1 /sound/arm/aaci.c
parentd695e4ea860fc1cbe1e4b101af4e0450219f2db9 (diff)
downloadlinux-631e8ad428c45ba7ab34df91d1db6cb7bf74d526.tar.xz
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/aaci.c')
-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)
card = snd_card_new(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
THIS_MODULE, sizeof(struct aaci));
if (card == NULL)
- return ERR_PTR(-ENOMEM);
+ return NULL;
card->private_free = aaci_free_card;
@@ -1083,8 +1083,8 @@ static int __devinit aaci_probe(struct amba_device *dev, void *id)
return ret;
aaci = aaci_init_card(dev);
- if (IS_ERR(aaci)) {
- ret = PTR_ERR(aaci);
+ if (!aaci) {
+ ret = -ENOMEM;
goto out;
}