summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-01-03 19:56:55 +0100
committerJaroslav Kysela <perex@suse.cz>2006-01-04 10:13:52 +0100
commit676338a1623ee9b60a6efb19ef8f743ab3b2eecb (patch)
tree353750772b10adbfa8eed9a09fea94b72f8f55ad /sound
parent[ALSA] Revert the nested-device patch (diff)
downloadlinux-676338a1623ee9b60a6efb19ef8f743ab3b2eecb.tar.xz
linux-676338a1623ee9b60a6efb19ef8f743ab3b2eecb.zip
[ALSA] opl3 - Fix the unreleased resources
Modules: OPL3 Fix the unreleased resources in the error path of snd_opl3_create(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/drivers/opl3/opl3_lib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c
index 650f3b8e60e0..1e0c76b9acfc 100644
--- a/sound/drivers/opl3/opl3_lib.c
+++ b/sound/drivers/opl3/opl3_lib.c
@@ -409,13 +409,13 @@ int snd_opl3_create(struct snd_card *card,
if (! integrated) {
if ((opl3->res_l_port = request_region(l_port, 2, "OPL2/3 (left)")) == NULL) {
snd_printk(KERN_ERR "opl3: can't grab left port 0x%lx\n", l_port);
- snd_opl3_free(opl3);
+ snd_device_free(card, opl3);
return -EBUSY;
}
if (r_port != 0 &&
(opl3->res_r_port = request_region(r_port, 2, "OPL2/3 (right)")) == NULL) {
snd_printk(KERN_ERR "opl3: can't grab right port 0x%lx\n", r_port);
- snd_opl3_free(opl3);
+ snd_device_free(card, opl3);
return -EBUSY;
}
}
@@ -434,7 +434,7 @@ int snd_opl3_create(struct snd_card *card,
if ((err = snd_opl3_detect(opl3)) < 0) {
snd_printd("OPL2/3 chip not detected at 0x%lx/0x%lx\n",
opl3->l_port, opl3->r_port);
- snd_opl3_free(opl3);
+ snd_device_free(card, opl3);
return err;
}
/* detect routine returns correct hardware type */