Commit 61a6a108 authored by Thomas Pfaff's avatar Thomas Pfaff Committed by Takashi Iwai
Browse files

ALSA: usb-audio: Check for possible chip NULL pointer before clearing probing flag



Before clearing the probing flag in the error exit path, check that the
chip pointer is not NULL.
Signed-off-by: default avatarThomas Pfaff <tpfaff@gmx.net>
Cc: <stable@kernel.org> [2.6.39+]
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent e0d32e33
......@@ -530,9 +530,11 @@ 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(&register_mutex);
__err_val:
return NULL;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment