Commit 6e1d7a51 authored by Dan Carpenter's avatar Dan Carpenter Committed by Takashi Iwai

ALSA: pcxhr: NULL dereference on probe failure

"card" is NULL if snd_card_new() fails.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent feabb67e
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment