[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <s5hd3enh0mj.wl%tiwai@suse.de>
Date: Mon, 26 Sep 2011 15:52:20 +0200
From: Takashi Iwai <tiwai@...e.de>
To: Thomas Pfaff <tpfaff@....net>
Cc: gregkh@...e.de, linux-kernel@...r.kernel.org,
alsa-devel@...a-project.org
Subject: Re: [PATCH] usb-audio: Check for possible chip NULL pointer before clearing probing flag
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@....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;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists