Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -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) {
		if (!chip->num_interfaces)
			snd_card_free(chip->card);
			snd_card_free(chip->card);
		chip->probing = 0;
		chip->probing = 0;
	}
	mutex_unlock(&register_mutex);
	mutex_unlock(&register_mutex);
 __err_val:
 __err_val:
	return NULL;
	return NULL;