Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dan Carpenter and committed by
Takashi Iwai
6e1d7a51 feabb67e

+1 -1
+1 -1
sound/pci/pcxhr/pcxhr.c
··· 1638 1638 0, &card); 1639 1639 1640 1640 if (err < 0) { 1641 - dev_err(card->dev, "cannot allocate the card %d\n", i); 1641 + dev_err(&pci->dev, "cannot allocate the card %d\n", i); 1642 1642 pcxhr_free(mgr); 1643 1643 return err; 1644 1644 }