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 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) | |||
325 | snd_assert(opl3 != NULL, return -ENXIO); | 325 | snd_assert(opl3 != NULL, return -ENXIO); |
326 | if (opl3->private_free) | 326 | if (opl3->private_free) |
327 | opl3->private_free(opl3); | 327 | opl3->private_free(opl3); |
328 | if (opl3->res_l_port) { | 328 | release_and_free_resource(opl3->res_l_port); |
329 | release_resource(opl3->res_l_port); | 329 | release_and_free_resource(opl3->res_r_port); |
330 | kfree_nocheck(opl3->res_l_port); | ||
331 | } | ||
332 | if (opl3->res_r_port) { | ||
333 | release_resource(opl3->res_r_port); | ||
334 | kfree_nocheck(opl3->res_r_port); | ||
335 | } | ||
336 | kfree(opl3); | 330 | kfree(opl3); |
337 | return 0; | 331 | return 0; |
338 | } | 332 | } |