Skip to content

Commit 6e1d7a5

Browse files
Dan Carpentertiwai
authored andcommitted
ALSA: pcxhr: NULL dereference on probe failure
"card" is NULL if snd_card_new() fails. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent feabb67 commit 6e1d7a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/pci/pcxhr/pcxhr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1638,7 +1638,7 @@ static int pcxhr_probe(struct pci_dev *pci,
16381638
0, &card);
16391639

16401640
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);
16421642
pcxhr_free(mgr);
16431643
return err;
16441644
}

0 commit comments

Comments
 (0)