From: Dan Carpenter Date: Wed, 10 Dec 2014 13:06:46 +0000 (+0300) Subject: ALSA: lola: NULL dereference on probe failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=feabb67e0eb0f509b530a56756ea44364843faea;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ALSA: lola: NULL dereference on probe failure "card" is NULL if snd_card_new() fails. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/lola/lola.c b/sound/pci/lola/lola.c index a75c8dc66dec..4cf4be5ef82a 100644 --- a/sound/pci/lola/lola.c +++ b/sound/pci/lola/lola.c @@ -719,7 +719,7 @@ static int lola_probe(struct pci_dev *pci, err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, 0, &card); if (err < 0) { - dev_err(card->dev, "Error creating card!\n"); + dev_err(&pci->dev, "Error creating card!\n"); return err; }