2003-08-14 03:49:48

by Shawn Starr

[permalink] [raw]
Subject: [PATCH][TRIVIAL][2.6.0-test3][SOUND-OPL3] Don't free struct opl3 we need it for snd_printd


This trivial patch fixes a panic when we try to display OPL3 debug info on
init.

Please apply, tested and works.

Shawn Starr.

diff -Nrup linux-2.6.0-test3-vanilla/sound/drivers/opl3/opl3_lib.c linux-2.6.0-test3-fixes/sound/drivers/opl3/opl3_lib.c
--- linux-2.6.0-test3-vanilla/sound/drivers/opl3/opl3_lib.c 2003-08-13 23:27:35.000000000 -0400
+++ linux-2.6.0-test3-fixes/sound/drivers/opl3/opl3_lib.c 2003-08-13 23:29:51.000000000 -0400
@@ -440,9 +440,9 @@ int snd_opl3_create(snd_card_t * card,
default:
opl3->command = &snd_opl2_command;
if ((err = snd_opl3_detect(opl3)) < 0) {
- snd_opl3_free(opl3);
snd_printd("OPL2/3 chip not detected at 0x%lx/0x%lx\n",
opl3->l_port, opl3->r_port);
+ snd_opl3_free(opl3);
return err;
}
/* detect routine returns correct hardware type */