From: Takashi Iwai <tiwai@suse.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jaroslav Kysela <perex@perex.cz>,
Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>,
Benoit Taine <benoit.taine@lip6.fr>,
Bjorn Helgaas <bhelgaas@google.com>,
Arnd Bergmann <arnd@arndb.de>,
alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] ALSA: pcxhr: NULL dereference on probe failure
Date: Wed, 10 Dec 2014 13:45:42 +0000 [thread overview]
Message-ID: <s5h61dj8vp5.wl-tiwai@suse.de> (raw)
In-Reply-To: <20141210132620.GB18593@mwanda>
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;
> }
>
prev parent reply other threads:[~2014-12-10 13:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-10 13:26 [patch] ALSA: pcxhr: NULL dereference on probe failure Dan Carpenter
2014-12-10 13:45 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5h61dj8vp5.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=arnd@arndb.de \
--cc=benoit.taine@lip6.fr \
--cc=bhelgaas@google.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=mahfouz.saif.elyazal@gmail.com \
--cc=perex@perex.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox