aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pcmcia/pdaudiocf
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@alsa3.local>2008-12-28 11:03:56 -0500
committerTakashi Iwai <tiwai@suse.de>2009-01-12 09:21:56 -0500
commit2fa51107c9aa80ae95b4524198442cdea82d08a3 (patch)
treee2e54d232553922fc00d8b835b17778f8ee5e87b /sound/pcmcia/pdaudiocf
parentaa3d75d80de464cf23af1d068a5e22f1527b6957 (diff)
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)
121 pdacf = snd_pdacf_create(card); 121 pdacf = snd_pdacf_create(card);
122 if (!pdacf) { 122 if (!pdacf) {
123 snd_card_free(card); 123 snd_card_free(card);
124 return -EIO; 124 return -ENOMEM;
125 } 125 }
126 126
127 if (snd_device_new(card, SNDRV_DEV_LOWLEVEL, pdacf, &ops) < 0) { 127 err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, pdacf, &ops);
128 if (err < 0) {
128 kfree(pdacf); 129 kfree(pdacf);
129 snd_card_free(card); 130 snd_card_free(card);
130 return -ENODEV; 131 return err;
131 } 132 }
132 133
133 snd_card_set_dev(card, &handle_to_dev(link)); 134 snd_card_set_dev(card, &handle_to_dev(link));