From ec33efe28f9f87e51cc79ce060ae0101eedd5a19 Mon Sep 17 00:00:00 2001 From: John Youn Date: Tue, 17 Jan 2017 20:32:41 -0800 Subject: [PATCH] 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 --- drivers/usb/dwc2/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1