ALSA: pcxhr: NULL dereference on probe failure
"card" is NULL if snd_card_new() fails. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Родитель
feabb67e0e
Коммит
6e1d7a5139
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче