]> err.no Git - linux-2.6/commitdiff
usb: usbmixer free kill urb cleanup
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>
Wed, 8 Nov 2006 14:37:04 +0000 (15:37 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Dec 2006 22:23:35 +0000 (14:23 -0800)
- usb_free_urb() cleanup
- usb_kill_urb() cleanup

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/usb/usbmixer.c

index 1024c178f5c0dbdf1430b864c4d405cbdf8b0162..e74eb1bc8d8778e97eb6fd93e65c2b60568b7fe5 100644 (file)
@@ -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);
 }