提交 61a6a108 编写于 作者: T Thomas Pfaff 提交者: Takashi Iwai

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: NThomas Pfaff <tpfaff@gmx.net>
Cc: <stable@kernel.org> [2.6.39+]
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册