ALSA: lola: NULL deref on allocation error
Subsystems (2)
PATCH 1/1 ALSA: lola: NULL deref on allocation error
"chip" is NULL here. We don't need a printk here because kmalloc() has it built in.
Signed-off-by Dan Carpenter <[email protected]>
sound/pci/lola/lola.c +0 -1
@@ -586,7 +586,6 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci, chip =kzalloc (sizeof (*chip),GFP_KERNEL );if (!chip) { -dev_err (chip->card->dev,"cannot allocate chip\n" );pci_disable_device (pci);return -ENOMEM ; }
Takashi Iwai
AppliedAt Wed, 5 Mar 2014 13:55:09 +0300,
Quoted 5 lines · Dan Carpenter
"chip" is NULL here. We don't need a printk here because
kmalloc()has it built in.Signed-off-by Dan Carpenter <[email protected]>
Thanks, applied.
Takashi
Quoted 14 lines
sound/pci/lola/lola.c +0
-1@@ -586,7 +586,6 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci, chip =kzalloc (sizeof (*chip),GFP_KERNEL );if (!chip) { -dev_err (chip->card->dev,"cannot allocate chip\n" );pci_disable_device (pci);return -ENOMEM ; }