Browse Source

usb: dwc2: Fix sizeof in kzalloc

Take the sizeof '*req' instead of 'struct dwc2_hsotg_req'.

Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
John Youn 8 years ago
parent
commit
ec33efe28f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/usb/dwc2/gadget.c

+ 1 - 1
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;