diff options
author | Karsten Wiese <annabellesgarden@yahoo.de> | 2005-04-20 04:12:35 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-05-29 04:04:47 -0400 |
commit | 230cd5e24853ed4dd960461989b8ed0986d37a99 (patch) | |
tree | 234496e25ba4fbbd6e920829987afc1f9fcade78 /sound/usb/usbaudio.c | |
parent | fe5ac9dcfe3b219209cf8e08347cce47658267d0 (diff) |
[ALSA] prevent oops & dead keyboard on usb unplugging while the device is being used
USB generic driver,USB USX2Y
Without this patch, some usb kobjects, which are parents to
the usx2y's kobjects can be freed before the usx2y's.
This led to an oops in get_kobj_path_length() and a dead
keyboard, when the usx2y's kobjects were freed.
The patch ensures the correct sequence.
Tested ok on kernel 2.6.12-rc2.
Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usbaudio.c')
-rw-r--r-- | sound/usb/usbaudio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 84b0bbddbd22..aae66144d411 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c | |||
@@ -3289,7 +3289,7 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr) | |||
3289 | } | 3289 | } |
3290 | usb_chip[chip->index] = NULL; | 3290 | usb_chip[chip->index] = NULL; |
3291 | up(®ister_mutex); | 3291 | up(®ister_mutex); |
3292 | snd_card_free_in_thread(card); | 3292 | snd_card_free(card); |
3293 | } else { | 3293 | } else { |
3294 | up(®ister_mutex); | 3294 | up(®ister_mutex); |
3295 | } | 3295 | } |