From f5e135af8737bdc57168cddb3fd83028b25c26cd Mon Sep 17 00:00:00 2001 From: Mariusz Kozlowski Date: Wed, 8 Nov 2006 15:37:00 +0100 Subject: usb: usbmidi kill urb cleanup - usb_kill_urb() cleanup Signed-off-by: Mariusz Kozlowski Signed-off-by: Greg Kroah-Hartman --- sound/usb/usbmidi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c index b7c5e59b229..24f5a26c5f0 100644 --- a/sound/usb/usbmidi.c +++ b/sound/usb/usbmidi.c @@ -981,7 +981,7 @@ void snd_usbmidi_disconnect(struct list_head* p) if (umidi->usb_protocol_ops->finish_out_endpoint) umidi->usb_protocol_ops->finish_out_endpoint(ep->out); } - if (ep->in && ep->in->urb) + if (ep->in) usb_kill_urb(ep->in->urb); } } -- cgit v1.2.3 From 68df9de1d0e95034355283dc12056f93de8e0a79 Mon Sep 17 00:00:00 2001 From: Mariusz Kozlowski Date: Wed, 8 Nov 2006 15:37:04 +0100 Subject: usb: usbmixer free kill urb cleanup - usb_free_urb() cleanup - usb_kill_urb() cleanup Signed-off-by: Mariusz Kozlowski Signed-off-by: Greg Kroah-Hartman --- sound/usb/usbmixer.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'sound') diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c index 1024c178f5c..e74eb1bc8d8 100644 --- a/sound/usb/usbmixer.c +++ b/sound/usb/usbmixer.c @@ -1620,8 +1620,7 @@ static void snd_usb_mixer_free(struct usb_mixer_interface *mixer) kfree(mixer->urb->transfer_buffer); usb_free_urb(mixer->urb); } - if (mixer->rc_urb) - usb_free_urb(mixer->rc_urb); + usb_free_urb(mixer->rc_urb); kfree(mixer->rc_setup_packet); kfree(mixer); } @@ -2056,8 +2055,6 @@ void snd_usb_mixer_disconnect(struct list_head *p) struct usb_mixer_interface *mixer; mixer = list_entry(p, struct usb_mixer_interface, list); - if (mixer->urb) - usb_kill_urb(mixer->urb); - if (mixer->rc_urb) - usb_kill_urb(mixer->rc_urb); + usb_kill_urb(mixer->urb); + usb_kill_urb(mixer->rc_urb); } -- cgit v1.2.3