diff options
author | Thomas Pfaff <tpfaff@gmx.net> | 2011-09-26 15:43:59 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-10-03 11:41:08 -0700 |
commit | 81aac2ec5c236e54389d8940da0d318dd23e06ee (patch) | |
tree | 40561608f9c0bac67801a6b1c0f8dd54a759713f /sound | |
parent | abdd8c6a58728c695a59f9d6b95d9b6b4d7ffbc8 (diff) | |
download | kernel_samsung_crespo-81aac2ec5c236e54389d8940da0d318dd23e06ee.zip kernel_samsung_crespo-81aac2ec5c236e54389d8940da0d318dd23e06ee.tar.gz kernel_samsung_crespo-81aac2ec5c236e54389d8940da0d318dd23e06ee.tar.bz2 |
ALSA: usb-audio: Check for possible chip NULL pointer before clearing probing flag
commit 61a6a108d15213f5ee06332e1e7766d3860e4453 upstream.
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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/usb/card.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c index 29b3094..57a8e2d 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -529,9 +529,11 @@ static void *snd_usb_audio_probe(struct usb_device *dev, 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; |