aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/buffer.c
diff options
context:
space:
mode:
authorNizam Haider <nizamhaider786@gmail.com>2015-04-29 16:19:33 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-10 15:44:10 +0200
commit424dd7dd9b48691c1bb57440493590c012199a95 (patch)
treef8c248af5bfba4d2ffe591290f620231d8896d92 /drivers/usb/core/buffer.c
parentusb: phy: Remove the phy-rcar-gen2-usb driver (diff)
downloadlinux-dev-424dd7dd9b48691c1bb57440493590c012199a95.tar.xz
linux-dev-424dd7dd9b48691c1bb57440493590c012199a95.zip
Usb: core: buffer: fixed the checkpatch warning
Fixed two warnings sizeof name and Blank line after declaration Signed-off-by: Nizam Haider <nizamhaider786@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/buffer.c')
-rw-r--r--drivers/usb/core/buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c
index 506b969ea7fd..89f2e7765093 100644
--- a/drivers/usb/core/buffer.c
+++ b/drivers/usb/core/buffer.c
@@ -70,7 +70,7 @@ int hcd_buffer_create(struct usb_hcd *hcd)
size = pool_max[i];
if (!size)
continue;
- snprintf(name, sizeof name, "buffer-%d", size);
+ snprintf(name, sizeof(name), "buffer-%d", size);
hcd->pool[i] = dma_pool_create(name, hcd->self.controller,
size, size, 0);
if (!hcd->pool[i]) {
@@ -95,6 +95,7 @@ void hcd_buffer_destroy(struct usb_hcd *hcd)
for (i = 0; i < HCD_BUFFER_POOLS; i++) {
struct dma_pool *pool = hcd->pool[i];
+
if (pool) {
dma_pool_destroy(pool);
hcd->pool[i] = NULL;