diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-07-29 23:29:23 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-07-30 18:43:37 +0200 |
commit | 1c99cabfc95d3b08fbf06d558ebfa76b5303710c (patch) | |
tree | 496fb62e3f8942c1573708cc66bd572b907028eb /drivers/usb/gadget/udc/fotg210-udc.c | |
parent | usb: phy: msm: Add D+/D- lines route control (diff) | |
download | linux-1c99cabfc95d3b08fbf06d558ebfa76b5303710c.tar.xz linux-1c99cabfc95d3b08fbf06d558ebfa76b5303710c.zip |
usb: gadget: fotg210-udc: remove duplicate conditions
We handle the "if (!req->req.length)" condition at the start of the
function and return. We can delete this dead code.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/udc/fotg210-udc.c')
-rw-r--r-- | drivers/usb/gadget/udc/fotg210-udc.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/usb/gadget/udc/fotg210-udc.c b/drivers/usb/gadget/udc/fotg210-udc.c index 1137e3384218..a99ed6d80e9a 100644 --- a/drivers/usb/gadget/udc/fotg210-udc.c +++ b/drivers/usb/gadget/udc/fotg210-udc.c @@ -384,25 +384,15 @@ static void fotg210_ep0_queue(struct fotg210_ep *ep, return; } if (ep->dir_in) { /* if IN */ - if (req->req.length) { - fotg210_start_dma(ep, req); - } else { - pr_err("%s : req->req.length = 0x%x\n", - __func__, req->req.length); - } + fotg210_start_dma(ep, req); if ((req->req.length == req->req.actual) || (req->req.actual < ep->ep.maxpacket)) fotg210_done(ep, req, 0); } else { /* OUT */ - if (!req->req.length) { - fotg210_done(ep, req, 0); - } else { - u32 value = ioread32(ep->fotg210->reg + - FOTG210_DMISGR0); + u32 value = ioread32(ep->fotg210->reg + FOTG210_DMISGR0); - value &= ~DMISGR0_MCX_OUT_INT; - iowrite32(value, ep->fotg210->reg + FOTG210_DMISGR0); - } + value &= ~DMISGR0_MCX_OUT_INT; + iowrite32(value, ep->fotg210->reg + FOTG210_DMISGR0); } } |