summaryrefslogtreecommitdiffstats
path: root/sound/drivers/opl4
diff options
context:
space:
mode:
Diffstat (limited to 'sound/drivers/opl4')
-rw-r--r--sound/drivers/opl4/opl4_lib.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c
index 380c2c704c54..4ae5dd8f011e 100644
--- a/sound/drivers/opl4/opl4_lib.c
+++ b/sound/drivers/opl4/opl4_lib.c
@@ -169,14 +169,8 @@ static void snd_opl4_free(opl4_t *opl4)
#ifdef CONFIG_PROC_FS
snd_opl4_free_proc(opl4);
#endif
- if (opl4->res_fm_port) {
- release_resource(opl4->res_fm_port);
- kfree_nocheck(opl4->res_fm_port);
- }
- if (opl4->res_pcm_port) {
- release_resource(opl4->res_pcm_port);
- kfree_nocheck(opl4->res_pcm_port);
- }
+ release_and_free_resource(opl4->res_fm_port);
+ release_and_free_resource(opl4->res_pcm_port);
kfree(opl4);
}
OpenPOWER on IntegriCloud