summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorThomas Pfaff <tpfaff@gmx.net>2011-09-26 15:43:59 +0200
committerTakashi Iwai <tiwai@suse.de>2011-09-26 15:48:47 +0200
commit61a6a108d15213f5ee06332e1e7766d3860e4453 (patch)
tree6ffc2d8dbe6d7c80109f3e316e7a11da0e4c926b /sound
parente0d32e335fc0e354db93a807736243f5035fbc67 (diff)
downloadlinux-stable-61a6a108d15213f5ee06332e1e7766d3860e4453.tar.gz
linux-stable-61a6a108d15213f5ee06332e1e7766d3860e4453.tar.bz2
linux-stable-61a6a108d15213f5ee06332e1e7766d3860e4453.zip
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/card.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c
index ed120ca2353d..d8f2bf401458 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -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;