summaryrefslogtreecommitdiffstats
path: root/sound/drivers/opl3
diff options
context:
space:
mode:
authorTakashi Iwai2005-10-10 11:56:31 +0200
committerJaroslav Kysela2005-11-04 13:18:00 +0100
commitb1d5776d865951c213a1caaab5d8bf5de7615dbd (patch)
treef999dca30f6e2d03a9176b86c613ae8f4531a6d6 /sound/drivers/opl3
parent[ALSA] Make snd_task_name() module local (diff)
downloadkernel-qcow2-linux-b1d5776d865951c213a1caaab5d8bf5de7615dbd.tar.gz
kernel-qcow2-linux-b1d5776d865951c213a1caaab5d8bf5de7615dbd.tar.xz
kernel-qcow2-linux-b1d5776d865951c213a1caaab5d8bf5de7615dbd.zip
[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>
Diffstat (limited to 'sound/drivers/opl3')
-rw-r--r--sound/drivers/opl3/opl3_lib.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c
index 1f84d78260de..06246503083c 100644
--- a/sound/drivers/opl3/opl3_lib.c
+++ b/sound/drivers/opl3/opl3_lib.c
@@ -325,14 +325,8 @@ static int snd_opl3_free(opl3_t *opl3)
snd_assert(opl3 != NULL, return -ENXIO);
if (opl3->private_free)
opl3->private_free(opl3);
- if (opl3->res_l_port) {
- release_resource(opl3->res_l_port);
- kfree_nocheck(opl3->res_l_port);
- }
- if (opl3->res_r_port) {
- release_resource(opl3->res_r_port);
- kfree_nocheck(opl3->res_r_port);
- }
+ release_and_free_resource(opl3->res_l_port);
+ release_and_free_resource(opl3->res_r_port);
kfree(opl3);
return 0;
}