aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-01-08 11:42:22 -0500
committerJaroslav Kysela <perex@suse.cz>2007-01-09 03:14:15 -0500
commit2a2a5dddece676acbe3775e5ca9961f325717022 (patch)
treec5f15278d3c5c0ff67b483f7de34a5f01e3d1d19 /sound
parent7fbe3ca571e4b0795b729658e3d76824be54cb18 (diff)
[ALSA] usbaudio - Fix kobject_add() error at reconnection
Fixed the error from kobject_add() at reconnection the usb audio device. This happens when an app keeps opening a device while the device is replugged, due to the confliction of the internal bookkept index and the really empty slot. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/usbaudio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index 5f160eebd15c..19bdcc74c96c 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -3286,6 +3286,7 @@ static void snd_usb_audio_create_proc(struct snd_usb_audio *chip)
3286 3286
3287static int snd_usb_audio_free(struct snd_usb_audio *chip) 3287static int snd_usb_audio_free(struct snd_usb_audio *chip)
3288{ 3288{
3289 usb_chip[chip->index] = NULL;
3289 kfree(chip); 3290 kfree(chip);
3290 return 0; 3291 return 0;
3291} 3292}
@@ -3547,7 +3548,6 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr)
3547 list_for_each(p, &chip->mixer_list) { 3548 list_for_each(p, &chip->mixer_list) {
3548 snd_usb_mixer_disconnect(p); 3549 snd_usb_mixer_disconnect(p);
3549 } 3550 }
3550 usb_chip[chip->index] = NULL;
3551 mutex_unlock(&register_mutex); 3551 mutex_unlock(&register_mutex);
3552 snd_card_free_when_closed(card); 3552 snd_card_free_when_closed(card);
3553 } else { 3553 } else {