Skip to content

Commit

Permalink
ALSA: lola: NULL dereference on probe failure
Browse files Browse the repository at this point in the history
"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>
  • Loading branch information
Dan Carpenter authored and Takashi Iwai committed Dec 10, 2014
1 parent 9faa73f commit feabb67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/lola/lola.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit feabb67

Please sign in to comment.