ALSA: pcxhr: NULL dereference on probe failure
Subsystems (2)
PATCH 1/1 ALSA: pcxhr: NULL dereference on probe failure
"card" is NULL if snd_card_new() fails.
Signed-off-by Dan Carpenter <[email protected]>
sound/pci/pcxhr/pcxhr.c +1 -1
@@ -1638,7 +1638,7 @@ static int pcxhr_probe(struct pci_dev *pci, 0, &card);if (err <0 ) { -dev_err (card->dev,"cannot allocate the card %d\n" , i); +dev_err (&pci->dev,"cannot allocate the card %d\n" , i);pcxhr_free (mgr);return err; }
Takashi Iwai
AppliedAt Wed, 10 Dec 2014 16:26:21 +0300,
Quoted 4 lines · Dan Carpenter
"card" is NULL if
snd_card_new()fails.Signed-off-by Dan Carpenter <[email protected]>
Applied, thanks.
Takashi
Quoted 15 lines
sound/pci/pcxhr/pcxhr.c +1
-1@@ -1638,7 +1638,7 @@ static int pcxhr_probe(struct pci_dev *pci, 0, &card);if (err <0 ) { -dev_err (card->dev,"cannot allocate the card %d\n" , i); +dev_err (&pci->dev,"cannot allocate the card %d\n" , i);pcxhr_free (mgr);return err; }