* [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
* Re: [patch] ALSA: pcxhr: NULL dereference on probe failure
2014-12-10 13:26 [patch] ALSA: pcxhr: NULL dereference on probe failure Dan Carpenter
@ 2014-12-10 13:45 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2014-12-10 13:45 UTC (permalink / raw)
To: Dan Carpenter
Cc: Jaroslav Kysela, Aya Mahfouz, Benoit Taine, Bjorn Helgaas,
Arnd Bergmann, alsa-devel, kernel-janitors
At Wed, 10 Dec 2014 16:26:21 +0300,
Dan Carpenter wrote:
>
> "card" is NULL if snd_card_new() fails.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied, thanks.
Takashi
>
> 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 [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