[PATCH][TRIVIAL][2.6.0-test3][SOUND-OPL3] Don't free struct opl3 weneed it for snd_printd

From: Shawn Starr
Date: Wed Aug 13 2003 - 23:04:36 EST



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 */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/