mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 07:34:12 +08:00
ALSA: lola: 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:
parent
9faa73f06e
commit
feabb67e0e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user