[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211207135401.5507-1-guozhengkui@vivo.com>
Date: Tue, 7 Dec 2021 21:53:47 +0800
From: Guo Zhengkui <guozhengkui@...o.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Alan Stern <stern@...land.harvard.edu>,
Li Jun <jun.li@....com>,
Kishon Vijay Abraham I <kishon@...com>,
Guo Zhengkui <guozhengkui@...o.com>,
Andrey Konovalov <andreyknvl@...il.com>,
Peter Chen <peter.chen@....com>,
linux-usb@...r.kernel.org (open list:USB SUBSYSTEM),
linux-kernel@...r.kernel.org (open list)
Cc: kernel@...o.com
Subject: [PATCH] usb: core: hcd: fix bug: application of sizeof to pointer
Fix following error:
./drivers/usb/core/hcd.c:1284:38-44: ERROR:
application of sizeof to pointer.
Use sizeof(*vaddr) instead.
Signed-off-by: Guo Zhengkui <guozhengkui@...o.com>
---
drivers/usb/core/hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 4d326ee12c36..996d5273cf60 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1281,7 +1281,7 @@ static int hcd_alloc_coherent(struct usb_bus *bus,
return -EFAULT;
}
- vaddr = hcd_buffer_alloc(bus, size + sizeof(vaddr),
+ vaddr = hcd_buffer_alloc(bus, size + sizeof(*vaddr),
mem_flags, dma_handle);
if (!vaddr)
return -ENOMEM;
--
2.20.1
Powered by blists - more mailing lists