mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 18:11:20 +00:00
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: Thomas Pfaff <tpfaff@gmx.net> Cc: <stable@kernel.org> [2.6.39+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
e0d32e335f
commit
61a6a108d1
1 changed files with 5 additions and 3 deletions
|
@ -530,9 +530,11 @@ snd_usb_audio_probe(struct usb_device *dev,
|
||||||
return chip;
|
return chip;
|
||||||
|
|
||||||
__error:
|
__error:
|
||||||
if (chip && !chip->num_interfaces)
|
if (chip) {
|
||||||
snd_card_free(chip->card);
|
if (!chip->num_interfaces)
|
||||||
chip->probing = 0;
|
snd_card_free(chip->card);
|
||||||
|
chip->probing = 0;
|
||||||
|
}
|
||||||
mutex_unlock(®ister_mutex);
|
mutex_unlock(®ister_mutex);
|
||||||
__err_val:
|
__err_val:
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue