public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] ALSA: lola: NULL dereference on probe failure
@ 2014-12-10 13:06 Dan Carpenter
  2014-12-10 13:45 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-12-10 13:06 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: Takashi Iwai, Benoit Taine, Bjorn Helgaas, alsa-devel,
	linux-kernel, kernel-janitors

"card" is NULL if snd_card_new() fails.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/sound/pci/lola/lola.c b/sound/pci/lola/lola.c
index a75c8dc..4cf4be5 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;
 	}
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-10 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-10 13:06 [patch] ALSA: lola: NULL dereference on probe failure Dan Carpenter
2014-12-10 13:45 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox