diff options
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 */ |