diff options
Diffstat (limited to 'sound/drivers/opl3/opl3_lib.c')
-rw-r--r-- | sound/drivers/opl3/opl3_lib.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c index 1f84d78..0624650 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; } |