usb: core: hcd: change sizeof(vaddr) to sizeof(unsigned long)

`vaddr` is a pointer to unsigned char. sizeof(vaddr) here intends
to get the size of a pointer. But readers may get confused. Change
sizeof(vaddr) to sizeof(unsigned long) makes more sense.

Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Link: https://lore.kernel.org/r/20211209062441.9856-1-guozhengkui@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Guo Zhengkui 2021-12-09 14:23:05 +08:00 committed by Greg Kroah-Hartman
parent aa9c2219f9
commit a927ae1fba
1 changed files with 1 additions and 1 deletions

View File

@ -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(unsigned long),
mem_flags, dma_handle);
if (!vaddr)
return -ENOMEM;