OSDN Git Service

usb: dwc2: Fix sizeof in kzalloc
authorJohn Youn <John.Youn@synopsys.com>
Wed, 18 Jan 2017 04:32:41 +0000 (20:32 -0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 24 Jan 2017 09:04:21 +0000 (11:04 +0200)
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>
drivers/usb/dwc2/gadget.c

index 763f1fb..6e00177 100644 (file)
@@ -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;