Просмотр исходного кода

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>
Dan Carpenter 10 лет назад
Родитель
Сommit
6e1d7a5139
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      sound/pci/pcxhr/pcxhr.c

+ 1 - 1
sound/pci/pcxhr/pcxhr.c

@@ -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;
 		}