[ALSA] Remove vmalloc wrapper, kfree_nocheck()
- Remove vmalloc wrapper
- Add release_and_free_resource() to remove kfree_nocheck() from each driver
and simplify the code
Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c
index 8f2872f..5fd374f 100644
--- a/sound/isa/gus/gus_main.c
+++ b/sound/isa/gus/gus_main.c
@@ -113,14 +113,8 @@
snd_gf1_stop(gus);
snd_gus_init_dma_irq(gus, 0);
__hw_end:
- if (gus->gf1.res_port1) {
- release_resource(gus->gf1.res_port1);
- kfree_nocheck(gus->gf1.res_port1);
- }
- if (gus->gf1.res_port2) {
- release_resource(gus->gf1.res_port2);
- kfree_nocheck(gus->gf1.res_port2);
- }
+ release_and_free_resource(gus->gf1.res_port1);
+ release_and_free_resource(gus->gf1.res_port2);
if (gus->gf1.irq >= 0)
free_irq(gus->gf1.irq, (void *) gus);
if (gus->gf1.dma1 >= 0) {