diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-03 00:57:29 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-03 00:57:29 -0400 |
commit | e37a97d44038700ff8c2f1080f71fdfc3a4c0c1e (patch) | |
tree | c78b612f6cca1efd305743c4bdce237f06975965 /drivers/usb/input/powermate.c | |
parent | 4bdd488f4bf7dc91b371fe160a4718b0a91bb2a4 (diff) |
Input: drivers/usb/input - usb_buffer_free() cleanup
usb_buffer_free() now handles NULLs so remove unneeded checks
form callers.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/usb/input/powermate.c')
-rw-r--r-- | drivers/usb/input/powermate.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/input/powermate.c b/drivers/usb/input/powermate.c index 4f93a760faee..448a470d28f2 100644 --- a/drivers/usb/input/powermate.c +++ b/drivers/usb/input/powermate.c | |||
@@ -291,12 +291,10 @@ static int powermate_alloc_buffers(struct usb_device *udev, struct powermate_dev | |||
291 | 291 | ||
292 | static void powermate_free_buffers(struct usb_device *udev, struct powermate_device *pm) | 292 | static void powermate_free_buffers(struct usb_device *udev, struct powermate_device *pm) |
293 | { | 293 | { |
294 | if (pm->data) | 294 | usb_buffer_free(udev, POWERMATE_PAYLOAD_SIZE_MAX, |
295 | usb_buffer_free(udev, POWERMATE_PAYLOAD_SIZE_MAX, | 295 | pm->data, pm->data_dma); |
296 | pm->data, pm->data_dma); | 296 | usb_buffer_free(udev, sizeof(*(pm->configcr)), |
297 | if (pm->configcr) | 297 | pm->configcr, pm->configcr_dma); |
298 | usb_buffer_free(udev, sizeof(*(pm->configcr)), | ||
299 | pm->configcr, pm->configcr_dma); | ||
300 | } | 298 | } |
301 | 299 | ||
302 | /* Called whenever a USB device matching one in our supported devices table is connected */ | 300 | /* Called whenever a USB device matching one in our supported devices table is connected */ |