Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e1d7a51 authored by Dan Carpenter's avatar Dan Carpenter Committed by Takashi Iwai
Browse files

ALSA: pcxhr: NULL dereference on probe failure



"card" is NULL if snd_card_new() fails.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent feabb67e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
		}