diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-03 06:57:29 +0200 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-03 06:57:29 +0200 |
commit | e37a97d44038700ff8c2f1080f71fdfc3a4c0c1e (patch) | |
tree | c78b612f6cca1efd305743c4bdce237f06975965 /drivers/usb/input/powermate.c | |
parent | Input: synaptics - don't complain about failed resets (diff) | |
download | linux-e37a97d44038700ff8c2f1080f71fdfc3a4c0c1e.tar.xz linux-e37a97d44038700ff8c2f1080f71fdfc3a4c0c1e.zip |
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 static void powermate_free_buffers(struct usb_device *udev, struct powermate_device *pm) { - if (pm->data) - usb_buffer_free(udev, POWERMATE_PAYLOAD_SIZE_MAX, - pm->data, pm->data_dma); - if (pm->configcr) - usb_buffer_free(udev, sizeof(*(pm->configcr)), - pm->configcr, pm->configcr_dma); + usb_buffer_free(udev, POWERMATE_PAYLOAD_SIZE_MAX, + pm->data, pm->data_dma); + usb_buffer_free(udev, sizeof(*(pm->configcr)), + pm->configcr, pm->configcr_dma); } /* Called whenever a USB device matching one in our supported devices table is connected */ |