Skip to contentSkip to conversation

ALSA: lola: NULL dereference on probe failure

PATCH Applied Dan Carpenter 2 participants 2 messages Dec 10, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: lola: NULL dereference on probe failure

"card" is NULL if snd_card_new() fails.

sound/pci/lola/lola.c +1 -1
index a75c8dc..4cf4be5 100644
@@ -719,7 +719,7 @@ static int lola_probe(struct pci_dev *pci,
 	err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
 			   0, &card);
 	if (err < 0) {
-		dev_err(card->dev, "Error creating card!\n");
+		dev_err(&pci->dev, "Error creating card!\n");
 		return err;
 	}
 
Applied
#1 lore raw

At Wed, 10 Dec 2014 16:06:46 +0300,

Quoted 4 lines · Dan Carpenter

"card" is NULL if snd_card_new() fails.

Applied, thanks.

Takashi

Quoted 15 lines
sound/pci/lola/lola.c +1 -1
index a75c8dc..4cf4be5 100644
@@ -719,7 +719,7 @@ static int lola_probe(struct pci_dev *pci,
 	err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
 			   0, &card);
 	if (err < 0) {
-		dev_err(card->dev, "Error creating card!\n");
+		dev_err(&pci->dev, "Error creating card!\n");
 		return err;
 	}