From: Takashi Iwai <tiwai@suse.de>
To: Thomas Pfaff <tpfaff@gmx.net>
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org,
alsa-devel@alsa-project.org
Subject: Re: [PATCH] usb-audio: Check for possible chip NULL pointer before clearing probing flag
Date: Mon, 26 Sep 2011 15:52:20 +0200 [thread overview]
Message-ID: <s5hd3enh0mj.wl%tiwai@suse.de> (raw)
In-Reply-To: <alpine.LNX.2.00.1109261529160.10952@lxtpfaff.pcs.ditec.de>
At Mon, 26 Sep 2011 15:43:59 +0200 (CEST),
Thomas Pfaff wrote:
>
> Before clearing the probing flag in the error exit path, check that the
> chip pointer is not NULL.
>
> Signed-off-by: Thomas Pfaff <tpfaff@gmx.net>
Applied now. Thanks.
Takashi
> ---
> diff -urp a/sound/usb/card.c b/sound/usb/card.c
> --- a/sound/usb/card.c 2011-09-26 14:58:02.468672118 +0200
> +++ b/sound/usb/card.c 2011-09-26 15:00:30.313110086 +0200
> @@ -530,9 +530,11 @@ snd_usb_audio_probe(struct usb_device *d
> return chip;
>
> __error:
> - if (chip && !chip->num_interfaces)
> - snd_card_free(chip->card);
> - chip->probing = 0;
> + if (chip) {
> + if (!chip->num_interfaces)
> + snd_card_free(chip->card);
> + chip->probing = 0;
> + }
> mutex_unlock(®ister_mutex);
> __err_val:
> return NULL;
>
prev parent reply other threads:[~2011-09-26 13:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-26 13:43 Thomas Pfaff
2011-09-26 13:52 ` 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=s5hd3enh0mj.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tpfaff@gmx.net \
/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
all inboxes | Powered by JetHome®