diff options
author | Rajesh Bhagat <rajesh.bhagat@freescale.com> | 2016-01-25 10:41:46 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-25 07:25:27 (GMT) |
commit | 910d786761e3bdaac232a75d5ae6ac10cc6c86a5 (patch) | |
tree | 112e190538095a3584fc0c0097b472c3844b5b4c /drivers | |
parent | 0533ae8521e38ed1f868dd821d2b607670c17e3f (diff) | |
download | linux-910d786761e3bdaac232a75d5ae6ac10cc6c86a5.tar.xz |
usb: gadget: add a sanity check for complete handler
complete handler is replaced by usb_gadget_giveback_request by
below commit,Which removed the sanity check which was added
for fsl specific gadget driver.usb: gadget: Refactor request
completion
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/udc/fsl_udc_core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c index 4ee7b08..0d207e6 100644 --- a/drivers/usb/gadget/udc/fsl_udc_core.c +++ b/drivers/usb/gadget/udc/fsl_udc_core.c @@ -198,7 +198,11 @@ __acquires(ep->udc->lock) spin_unlock(&ep->udc->lock); - usb_gadget_giveback_request(&ep->ep, &req->req); + /* this complete() should a func implemented by gadget layer, + * eg fsg->bulk_in_complete() + */ + if (req->req.complete) + usb_gadget_giveback_request(&ep->ep, &req->req); spin_lock(&ep->udc->lock); ep->stopped = stopped; |