[patch] ALSA: usb-audio - NULL dereference on probe error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There was a potential NULL dereference introduced in 362e4e49abe
"ALSA: usb-audio - clear chip->probing on error exit"

Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

diff --git a/sound/usb/card.c b/sound/usb/card.c
index cc08588..8db260f 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -532,7 +532,8 @@ snd_usb_audio_probe(struct usb_device *dev,
  __error:
 	if (chip && !chip->num_interfaces)
 		snd_card_free(chip->card);
-	chip->probing = 0;
+	if (chip)
+		chip->probing = 0;
 	mutex_unlock(&register_mutex);
  __err_val:
 	return NULL;
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux