Loading drivers/usb/gadget/function/f_ecm.c +2 −1 Original line number Diff line number Diff line Loading @@ -774,7 +774,8 @@ ecm_bind(struct usb_configuration *c, struct usb_function *f) ecm->notify_req = usb_ep_alloc_request(ep, GFP_KERNEL); if (!ecm->notify_req) goto fail; ecm->notify_req->buf = kmalloc(ECM_STATUS_BYTECOUNT, GFP_KERNEL); ecm->notify_req->buf = kmalloc(ECM_STATUS_BYTECOUNT + cdev->gadget->extra_buf_alloc, GFP_KERNEL); if (!ecm->notify_req->buf) goto fail; ecm->notify_req->context = ecm; Loading drivers/usb/gadget/function/f_mbim.c +5 −3 Original line number Diff line number Diff line Loading @@ -567,13 +567,14 @@ static void mbim_free_ctrl_pkt(struct ctrl_pkt *pkt) } } static struct usb_request *mbim_alloc_req(struct usb_ep *ep, int buffer_size) static struct usb_request *mbim_alloc_req(struct usb_ep *ep, int buffer_size, size_t extra_buf) { struct usb_request *req = usb_ep_alloc_request(ep, GFP_KERNEL); if (!req) return NULL; req->buf = kmalloc(buffer_size, GFP_KERNEL); req->buf = kmalloc(buffer_size + extra_buf, GFP_KERNEL); if (!req->buf) { usb_ep_free_request(ep, req); return NULL; Loading Loading @@ -1510,7 +1511,8 @@ mbim_bind(struct usb_configuration *c, struct usb_function *f) status = -ENOMEM; /* allocate notification request and buffer */ mbim->not_port.notify_req = mbim_alloc_req(ep, NCM_STATUS_BYTECOUNT); mbim->not_port.notify_req = mbim_alloc_req(ep, NCM_STATUS_BYTECOUNT, cdev->gadget->extra_buf_alloc); if (!mbim->not_port.notify_req) { pr_info("failed to allocate notify request\n"); goto fail; Loading drivers/usb/gadget/function/f_uac1.c +3 −2 Original line number Diff line number Diff line Loading @@ -1010,7 +1010,8 @@ static int f_audio_set_alt(struct usb_function *f, unsigned intf, unsigned alt) pr_err("request allocation failed\n"); return -ENOMEM; } req->buf = kzalloc(req_capture_buf_size, req->buf = kzalloc(req_capture_buf_size + cdev->gadget->extra_buf_alloc, GFP_ATOMIC); if (!req->buf) { pr_err("request buffer allocation failed\n"); Loading Loading
drivers/usb/gadget/function/f_ecm.c +2 −1 Original line number Diff line number Diff line Loading @@ -774,7 +774,8 @@ ecm_bind(struct usb_configuration *c, struct usb_function *f) ecm->notify_req = usb_ep_alloc_request(ep, GFP_KERNEL); if (!ecm->notify_req) goto fail; ecm->notify_req->buf = kmalloc(ECM_STATUS_BYTECOUNT, GFP_KERNEL); ecm->notify_req->buf = kmalloc(ECM_STATUS_BYTECOUNT + cdev->gadget->extra_buf_alloc, GFP_KERNEL); if (!ecm->notify_req->buf) goto fail; ecm->notify_req->context = ecm; Loading
drivers/usb/gadget/function/f_mbim.c +5 −3 Original line number Diff line number Diff line Loading @@ -567,13 +567,14 @@ static void mbim_free_ctrl_pkt(struct ctrl_pkt *pkt) } } static struct usb_request *mbim_alloc_req(struct usb_ep *ep, int buffer_size) static struct usb_request *mbim_alloc_req(struct usb_ep *ep, int buffer_size, size_t extra_buf) { struct usb_request *req = usb_ep_alloc_request(ep, GFP_KERNEL); if (!req) return NULL; req->buf = kmalloc(buffer_size, GFP_KERNEL); req->buf = kmalloc(buffer_size + extra_buf, GFP_KERNEL); if (!req->buf) { usb_ep_free_request(ep, req); return NULL; Loading Loading @@ -1510,7 +1511,8 @@ mbim_bind(struct usb_configuration *c, struct usb_function *f) status = -ENOMEM; /* allocate notification request and buffer */ mbim->not_port.notify_req = mbim_alloc_req(ep, NCM_STATUS_BYTECOUNT); mbim->not_port.notify_req = mbim_alloc_req(ep, NCM_STATUS_BYTECOUNT, cdev->gadget->extra_buf_alloc); if (!mbim->not_port.notify_req) { pr_info("failed to allocate notify request\n"); goto fail; Loading
drivers/usb/gadget/function/f_uac1.c +3 −2 Original line number Diff line number Diff line Loading @@ -1010,7 +1010,8 @@ static int f_audio_set_alt(struct usb_function *f, unsigned intf, unsigned alt) pr_err("request allocation failed\n"); return -ENOMEM; } req->buf = kzalloc(req_capture_buf_size, req->buf = kzalloc(req_capture_buf_size + cdev->gadget->extra_buf_alloc, GFP_ATOMIC); if (!req->buf) { pr_err("request buffer allocation failed\n"); Loading