linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][TRIVIAL][2.6.0-test3][SOUND-OPL3] Don't free struct opl3 we need it for snd_printd
@ 2003-08-14  3:49 Shawn Starr
  0 siblings, 0 replies; only message in thread
From: Shawn Starr @ 2003-08-14  3:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: trivial, Jaroslav Kysela


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-08-14  3:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-14  3:49 [PATCH][TRIVIAL][2.6.0-test3][SOUND-OPL3] Don't free struct opl3 we need it for snd_printd Shawn Starr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).