ALSA: lola: NULL dereference on probe failure
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 10 Dec 2014 13:06:46 +0000 (16:06 +0300)
committerTakashi Iwai <tiwai@suse.de>
Wed, 10 Dec 2014 13:45:15 +0000 (14:45 +0100)
"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>
sound/pci/lola/lola.c

index a75c8dc66dece825d10311a48f24327c92b88a3b..4cf4be5ef82a3b0377b853af6aef59beafa9d38a 100644 (file)
@@ -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;
        }