aboutsummaryrefslogtreecommitdiffstats
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 5375705c054b..95540f133199 100644
--- a/sound/isa/sb/emu8000.c
+++ b/sound/isa/sb/emu8000.c
@@ -1054,18 +1054,9 @@ __error:
1054 */ 1054 */
1055static int snd_emu8000_free(emu8000_t *hw) 1055static int snd_emu8000_free(emu8000_t *hw)
1056{ 1056{
1057 if (hw->res_port1) { 1057 release_and_free_resource(hw->res_port1);
1058 release_resource(hw->res_port1); 1058 release_and_free_resource(hw->res_port2);
1059 kfree_nocheck(hw->res_port1); 1059 release_and_free_resource(hw->res_port3);
1060 }
1061 if (hw->res_port2) {
1062 release_resource(hw->res_port2);
1063 kfree_nocheck(hw->res_port2);
1064 }
1065 if (hw->res_port3) {
1066 release_resource(hw->res_port3);
1067 kfree_nocheck(hw->res_port3);
1068 }
1069 kfree(hw); 1060 kfree(hw);
1070 return 0; 1061 return 0;
1071} 1062}
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c
index 7888783d68f5..c2fa451bc8f0 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)
345 345
346 if (acard == NULL) 346 if (acard == NULL)
347 return; 347 return;
348 if (acard->fm_res) { 348 release_and_free_resource(acard->fm_res);
349 release_resource(acard->fm_res);
350 kfree_nocheck(acard->fm_res);
351 }
352} 349}
353 350
354#ifdef CONFIG_PNP 351#ifdef CONFIG_PNP
diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c
index c41ac25e85ca..0bc0a3afdabc 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)
78 78
79 if (acard == NULL) 79 if (acard == NULL)
80 return; 80 return;
81 if (acard->fm_res) { 81 release_and_free_resource(acard->fm_res);
82 release_resource(acard->fm_res);
83 kfree_nocheck(acard->fm_res);
84 }
85} 82}
86 83
87static int __init snd_sb8_probe(int dev) 84static int __init snd_sb8_probe(int dev)
diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c
index f0f205ae425f..46b9480669f9 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)
178 178
179static int snd_sbdsp_free(sb_t *chip) 179static int snd_sbdsp_free(sb_t *chip)
180{ 180{
181 if (chip->res_port) { 181 if (chip->res_port)
182 release_resource(chip->res_port); 182 release_and_free_resource(chip->res_port);
183 kfree_nocheck(chip->res_port);
184 }
185 if (chip->irq >= 0) 183 if (chip->irq >= 0)
186 free_irq(chip->irq, (void *) chip); 184 free_irq(chip->irq, (void *) chip);
187#ifdef CONFIG_ISA 185#ifdef CONFIG_ISA