[PATCH] usb: core: hcd: fix bug: application of sizeof to pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
---
 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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux