summaryrefslogtreecommitdiffstats
path: root/sound/pcmcia/pdaudiocf
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@alsa3.local>2008-12-28 17:03:56 +0100
committerTakashi Iwai <tiwai@suse.de>2009-01-12 15:21:56 +0100
commit2fa51107c9aa80ae95b4524198442cdea82d08a3 (patch)
treee2e54d232553922fc00d8b835b17778f8ee5e87b /sound/pcmcia/pdaudiocf
parentaa3d75d80de464cf23af1d068a5e22f1527b6957 (diff)
downloadlinux-2fa51107c9aa80ae95b4524198442cdea82d08a3.tar.gz
linux-2fa51107c9aa80ae95b4524198442cdea82d08a3.tar.bz2
linux-2fa51107c9aa80ae95b4524198442cdea82d08a3.zip
ALSA: Return proper error code at probe in sound/pcmcia/*
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pcmcia/pdaudiocf')
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c
index ec51569fd50d..7dea74b71cf1 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c
@@ -121,13 +121,14 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
pdacf = snd_pdacf_create(card);
if (!pdacf) {
snd_card_free(card);
- return -EIO;
+ return -ENOMEM;
}
- if (snd_device_new(card, SNDRV_DEV_LOWLEVEL, pdacf, &ops) < 0) {
+ err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, pdacf, &ops);
+ if (err < 0) {
kfree(pdacf);
snd_card_free(card);
- return -ENODEV;
+ return err;
}
snd_card_set_dev(card, &handle_to_dev(link));