[alsa-devel] [PATCH] cs4236: add missing pnp_request_card_device()

Krzysztof Helt krzysztof.h1 at poczta.fm
Tue Jul 22 23:51:00 CEST 2008


From: Krzysztof Helt <krzysztof.h1 at wp.pl>

There is a missing pnp_request_card_device() call
for cs4232 card. The acard->wss pointer is left
uninitialized which leads to crash during detection.

Signed-off-by: Krzysztof Helt <krzysztof.h1 at wp.pl>
---

This bug was found in the 2.6.26-git9 kernel.

Please compare the snd_card_cs4232_pnp() and
the snd_card_cs423x_pnpc().

--- linux-2.6.26/sound/isa/cs423x/cs4236.c~	2008-07-13 23:51:29.000000000 +0200
+++ linux-2.6.26/sound/isa/cs423x/cs4236.c	2008-07-22 23:41:56.010942922 +0200
@@ -325,6 +325,9 @@ static int __devinit snd_cs423x_pnp_init
 static int __devinit snd_card_cs4232_pnp(int dev, struct snd_card_cs4236 *acard,
 					 struct pnp_dev *pdev)
 {
+	acard->wss = pnp_request_card_device(card, id->devs[0].id, NULL);
+	if (acard->wss == NULL)
+		return -EBUSY;
 	if (snd_cs423x_pnp_init_wss(dev, acard->wss) < 0)
 		return -EBUSY;
 	cport[dev] = -1;

----------------------------------------------------------------------
Czy Twoj mezczyzna gotuje dla Ciebie? 
Wygraj nagrody >>> http://link.interia.pl/f1e86 



More information about the Alsa-devel mailing list