linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ALSA][2/6] Fix oops when initialisation fails.
@ 2004-03-15 19:27 davej
  0 siblings, 0 replies; only message in thread
From: davej @ 2004-03-15 19:27 UTC (permalink / raw)
  To: linux-kernel

Try modprobing a driver that the hardware doesn't exist for.
In a few situations, you'll hit an oops due to proc_id not
being filled out that early.

		Dave


--- linux-2.6.4/sound/core/init.c~	2004-03-15 17:45:20.000000000 +0000
+++ linux-2.6.4/sound/core/init.c	2004-03-15 17:45:40.000000000 +0000
@@ -281,7 +281,8 @@
 	}
 	if (card->private_free)
 		card->private_free(card);
-	snd_info_unregister(card->proc_id);
+	if (card->proc_id)
+		snd_info_unregister(card->proc_id);
 	if (snd_info_card_free(card) < 0) {
 		snd_printk(KERN_WARNING "unable to free card info\n");
 		/* Not fatal error */


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

only message in thread, other threads:[~2004-03-15 19:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-15 19:27 [ALSA][2/6] Fix oops when initialisation fails davej

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).