summaryrefslogtreecommitdiffstats
path: root/sound/pci/als4000.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/als4000.c')
-rw-r--r--sound/pci/als4000.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/pci/als4000.c b/sound/pci/als4000.c
index 196ec1c61bb4..8a32cd92f62a 100644
--- a/sound/pci/als4000.c
+++ b/sound/pci/als4000.c
@@ -594,8 +594,7 @@ static int __devinit snd_als4000_create_gameport(snd_card_als4000_t *acard, int
acard->gameport = gp = gameport_allocate_port();
if (!gp) {
printk(KERN_ERR "als4000: cannot allocate memory for gameport\n");
- release_resource(r);
- kfree_nocheck(r);
+ release_and_free_resource(r);
return -ENOMEM;
}
@@ -622,8 +621,7 @@ static void snd_als4000_free_gameport(snd_card_als4000_t *acard)
acard->gameport = NULL;
snd_als4000_set_addr(acard->gcr, 0, 0, 0, 0); /* disable joystick */
- release_resource(r);
- kfree_nocheck(r);
+ release_and_free_resource(r);
}
}
#else
OpenPOWER on IntegriCloud