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

"card" is NULL if snd_card_new() fails.

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

diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c
index a602930..c6092e4 100644
--- a/sound/pci/pcxhr/pcxhr.c
+++ b/sound/pci/pcxhr/pcxhr.c
@@ -1638,7 +1638,7 @@ static int pcxhr_probe(struct pci_dev *pci,
 				   0, &card);
 
 		if (err < 0) {
-			dev_err(card->dev, "cannot allocate the card %d\n", i);
+			dev_err(&pci->dev, "cannot allocate the card %d\n", i);
 			pcxhr_free(mgr);
 			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:26 [patch] ALSA: pcxhr: 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