mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
ALSA: usb-audio: Check for possible chip NULL pointer before clearing probing flag
commit 61a6a108d1 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>
This commit is contained in:
parent
abdd8c6a58
commit
81aac2ec5c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user