diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-03 01:04:52 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2007-05-08 20:52:51 -0400 |
commit | 6675c5bd2a0ec223888b42cf97bc7dc900bf31fb (patch) | |
tree | baa178df18335195918781b449ef17bbafac5c40 /drivers/hid/usbhid/usbkbd.c | |
parent | 66da876962f782a3974b4a957d12f20656584a4d (diff) |
USB HID: usb_buffer_free() cleanup
usb_buffer_free() now handles NULLs so remove unneeded checks
form callers.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid/usbkbd.c')
-rw-r--r-- | drivers/hid/usbhid/usbkbd.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c index 65aa12e8d7b3..36ddc7a7a427 100644 --- a/drivers/hid/usbhid/usbkbd.c +++ b/drivers/hid/usbhid/usbkbd.c | |||
@@ -211,12 +211,9 @@ static void usb_kbd_free_mem(struct usb_device *dev, struct usb_kbd *kbd) | |||
211 | { | 211 | { |
212 | usb_free_urb(kbd->irq); | 212 | usb_free_urb(kbd->irq); |
213 | usb_free_urb(kbd->led); | 213 | usb_free_urb(kbd->led); |
214 | if (kbd->new) | 214 | usb_buffer_free(dev, 8, kbd->new, kbd->new_dma); |
215 | usb_buffer_free(dev, 8, kbd->new, kbd->new_dma); | 215 | usb_buffer_free(dev, sizeof(struct usb_ctrlrequest), kbd->cr, kbd->cr_dma); |
216 | if (kbd->cr) | 216 | usb_buffer_free(dev, 1, kbd->leds, kbd->leds_dma); |
217 | usb_buffer_free(dev, sizeof(struct usb_ctrlrequest), kbd->cr, kbd->cr_dma); | ||
218 | if (kbd->leds) | ||
219 | usb_buffer_free(dev, 1, kbd->leds, kbd->leds_dma); | ||
220 | } | 217 | } |
221 | 218 | ||
222 | static int usb_kbd_probe(struct usb_interface *iface, | 219 | static int usb_kbd_probe(struct usb_interface *iface, |