From: Nizam Haider Date: Wed, 29 Apr 2015 10:49:33 +0000 (+0530) Subject: Usb: core: buffer: fixed the checkpatch warning X-Git-Tag: v5.15~15547^2~60 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=424dd7dd9b48691c1bb57440493590c012199a95;p=platform%2Fkernel%2Flinux-starfive.git Usb: core: buffer: fixed the checkpatch warning Fixed two warnings sizeof name and Blank line after declaration Signed-off-by: Nizam Haider Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c index 506b969..89f2e77 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;