summaryrefslogtreecommitdiff
path: root/sound/isa/sb
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/sb')
-rw-r--r--sound/isa/sb/emu8000.c15
-rw-r--r--sound/isa/sb/sb16.c5
-rw-r--r--sound/isa/sb/sb8.c5
-rw-r--r--sound/isa/sb/sb_common.c6
4 files changed, 7 insertions, 24 deletions
diff --git a/sound/isa/sb/emu8000.c b/sound/isa/sb/emu8000.c
index 5375705c054..95540f13319 100644
--- a/sound/isa/sb/emu8000.c
+++ b/sound/isa/sb/emu8000.c
@@ -1054,18 +1054,9 @@ __error:
*/
static int snd_emu8000_free(emu8000_t *hw)
{
- if (hw->res_port1) {
- release_resource(hw->res_port1);
- kfree_nocheck(hw->res_port1);
- }
- if (hw->res_port2) {
- release_resource(hw->res_port2);
- kfree_nocheck(hw->res_port2);
- }
- if (hw->res_port3) {
- release_resource(hw->res_port3);
- kfree_nocheck(hw->res_port3);
- }
+ release_and_free_resource(hw->res_port1);
+ release_and_free_resource(hw->res_port2);
+ release_and_free_resource(hw->res_port3);
kfree(hw);
return 0;
}
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c
index 7888783d68f..c2fa451bc8f 100644
--- a/sound/isa/sb/sb16.c
+++ b/sound/isa/sb/sb16.c
@@ -345,10 +345,7 @@ static void snd_sb16_free(snd_card_t *card)
if (acard == NULL)
return;
- if (acard->fm_res) {
- release_resource(acard->fm_res);
- kfree_nocheck(acard->fm_res);
- }
+ release_and_free_resource(acard->fm_res);
}
#ifdef CONFIG_PNP
diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c
index c41ac25e85c..0bc0a3afdab 100644
--- a/sound/isa/sb/sb8.c
+++ b/sound/isa/sb/sb8.c
@@ -78,10 +78,7 @@ static void snd_sb8_free(snd_card_t *card)
if (acard == NULL)
return;
- if (acard->fm_res) {
- release_resource(acard->fm_res);
- kfree_nocheck(acard->fm_res);
- }
+ release_and_free_resource(acard->fm_res);
}
static int __init snd_sb8_probe(int dev)
diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c
index f0f205ae425..46b9480669f 100644
--- a/sound/isa/sb/sb_common.c
+++ b/sound/isa/sb/sb_common.c
@@ -178,10 +178,8 @@ static int snd_sbdsp_probe(sb_t * chip)
static int snd_sbdsp_free(sb_t *chip)
{
- if (chip->res_port) {
- release_resource(chip->res_port);
- kfree_nocheck(chip->res_port);
- }
+ if (chip->res_port)
+ release_and_free_resource(chip->res_port);
if (chip->irq >= 0)
free_irq(chip->irq, (void *) chip);
#ifdef CONFIG_ISA