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

Signed-off-by: John Youn <johny...@synopsys.com>
---
 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 01c87e8..d867cb5 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.10.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to