Skip to content

Commit

Permalink
ALSA: pcxhr: 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 tiwai committed Dec 10, 2014
1 parent feabb67 commit 6e1d7a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/pcxhr/pcxhr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6e1d7a5

Please sign in to comment.