summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc2
diff options
context:
space:
mode:
authorJohn Youn <John.Youn@synopsys.com>2017-01-18 07:32:41 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-01-24 12:04:21 +0300
commitec33efe28f9f87e51cc79ce060ae0101eedd5a19 (patch)
tree1700ea16878652b7c8639dc682ad8de8ef46836b /drivers/usb/dwc2
parent1a2e91091330570655f2cd16fb3c624783387d8c (diff)
downloadlinux-ec33efe28f9f87e51cc79ce060ae0101eedd5a19.tar.xz
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>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r--drivers/usb/dwc2/gadget.c2
1 files changed, 1 insertions, 1 deletions
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;