Skip to contentSkip to conversation

Fix oops when initialisation fails.

PATCH New [email protected] 1 participant 1 message Mar 15, 2004 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 2/6 Fix oops when initialisation fails.

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

sound/core/init.c renamed from sound/core/init.c~ +2 -1
@@ -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 */