diff options
Diffstat (limited to 'sound/usb/usx2y/usbusx2y.c')
-rw-r--r-- | sound/usb/usx2y/usbusx2y.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c index cf77313c609d..412c2e52d867 100644 --- a/sound/usb/usx2y/usbusx2y.c +++ b/sound/usb/usx2y/usbusx2y.c | |||
@@ -285,7 +285,6 @@ int usX2Y_AsyncSeq04_init(usX2Ydev_t* usX2Y) | |||
285 | 285 | ||
286 | int usX2Y_In04_init(usX2Ydev_t* usX2Y) | 286 | int usX2Y_In04_init(usX2Ydev_t* usX2Y) |
287 | { | 287 | { |
288 | int err = 0; | ||
289 | if (! (usX2Y->In04urb = usb_alloc_urb(0, GFP_KERNEL))) | 288 | if (! (usX2Y->In04urb = usb_alloc_urb(0, GFP_KERNEL))) |
290 | return -ENOMEM; | 289 | return -ENOMEM; |
291 | 290 | ||
@@ -299,8 +298,7 @@ int usX2Y_In04_init(usX2Ydev_t* usX2Y) | |||
299 | usX2Y->In04Buf, 21, | 298 | usX2Y->In04Buf, 21, |
300 | i_usX2Y_In04Int, usX2Y, | 299 | i_usX2Y_In04Int, usX2Y, |
301 | 10); | 300 | 10); |
302 | err = usb_submit_urb(usX2Y->In04urb, GFP_KERNEL); | 301 | return usb_submit_urb(usX2Y->In04urb, GFP_KERNEL); |
303 | return err; | ||
304 | } | 302 | } |
305 | 303 | ||
306 | static void usX2Y_unlinkSeq(snd_usX2Y_AsyncSeq_t* S) | 304 | static void usX2Y_unlinkSeq(snd_usX2Y_AsyncSeq_t* S) |
@@ -432,20 +430,21 @@ static void snd_usX2Y_card_private_free(snd_card_t *card) | |||
432 | static void usX2Y_usb_disconnect(struct usb_device* device, void* ptr) | 430 | static void usX2Y_usb_disconnect(struct usb_device* device, void* ptr) |
433 | { | 431 | { |
434 | if (ptr) { | 432 | if (ptr) { |
435 | usX2Ydev_t* usX2Y = usX2Y((snd_card_t*)ptr); | 433 | snd_card_t *card = ptr; |
436 | struct list_head* p; | 434 | usX2Ydev_t* usX2Y = usX2Y(card); |
435 | struct list_head *p; | ||
437 | usX2Y->chip.shutdown = 1; | 436 | usX2Y->chip.shutdown = 1; |
438 | usX2Y->chip_status = USX2Y_STAT_CHIP_HUP; | 437 | usX2Y->chip_status = USX2Y_STAT_CHIP_HUP; |
439 | usX2Y_unlinkSeq(&usX2Y->AS04); | 438 | usX2Y_unlinkSeq(&usX2Y->AS04); |
440 | usb_kill_urb(usX2Y->In04urb); | 439 | usb_kill_urb(usX2Y->In04urb); |
441 | snd_card_disconnect((snd_card_t*)ptr); | 440 | snd_card_disconnect(card); |
442 | /* release the midi resources */ | 441 | /* release the midi resources */ |
443 | list_for_each(p, &usX2Y->chip.midi_list) { | 442 | list_for_each(p, &usX2Y->chip.midi_list) { |
444 | snd_usbmidi_disconnect(p); | 443 | snd_usbmidi_disconnect(p); |
445 | } | 444 | } |
446 | if (usX2Y->us428ctls_sharedmem) | 445 | if (usX2Y->us428ctls_sharedmem) |
447 | wake_up(&usX2Y->us428ctls_wait_queue_head); | 446 | wake_up(&usX2Y->us428ctls_wait_queue_head); |
448 | snd_card_free((snd_card_t*)ptr); | 447 | snd_card_free(card); |
449 | } | 448 | } |
450 | } | 449 | } |
451 | 450 | ||