From: John Youn Date: Wed, 18 Jan 2017 04:32:41 +0000 (-0800) Subject: usb: dwc2: Fix sizeof in kzalloc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ec33efe28f9f87e51cc79ce060ae0101eedd5a19;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git usb: dwc2: Fix sizeof in kzalloc Take the sizeof '*req' instead of 'struct dwc2_hsotg_req'. Signed-off-by: John Youn Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 763f1fb3004e..6e00177da02b 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -281,7 +281,7 @@ static struct usb_request *dwc2_hsotg_ep_alloc_request(struct usb_ep *ep, { struct dwc2_hsotg_req *req; - req = kzalloc(sizeof(struct dwc2_hsotg_req), flags); + req = kzalloc(sizeof(*req), flags); if (!req) return NULL;