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

Commit 7cf9bb21 authored by Dan Carpenter's avatar Dan Carpenter Committed by Takashi Iwai
Browse files

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