summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c
index 183f661..ec51569 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c
@@ -119,8 +119,10 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
}
pdacf = snd_pdacf_create(card);
- if (! pdacf)
+ if (!pdacf) {
+ snd_card_free(card);
return -EIO;
+ }
if (snd_device_new(card, SNDRV_DEV_LOWLEVEL, pdacf, &ops) < 0) {
kfree(pdacf);
OpenPOWER on IntegriCloud