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>
This commit is contained in:

committed by
Felipe Balbi

parent
6f98f545b0
commit
1c99cabfc9
@@ -384,26 +384,16 @@ static void fotg210_ep0_queue(struct fotg210_ep *ep,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ep->dir_in) { /* if IN */
|
if (ep->dir_in) { /* if IN */
|
||||||
if (req->req.length) {
|
|
||||||
fotg210_start_dma(ep, req);
|
fotg210_start_dma(ep, req);
|
||||||
} else {
|
|
||||||
pr_err("%s : req->req.length = 0x%x\n",
|
|
||||||
__func__, req->req.length);
|
|
||||||
}
|
|
||||||
if ((req->req.length == req->req.actual) ||
|
if ((req->req.length == req->req.actual) ||
|
||||||
(req->req.actual < ep->ep.maxpacket))
|
(req->req.actual < ep->ep.maxpacket))
|
||||||
fotg210_done(ep, req, 0);
|
fotg210_done(ep, req, 0);
|
||||||
} else { /* OUT */
|
} else { /* OUT */
|
||||||
if (!req->req.length) {
|
u32 value = ioread32(ep->fotg210->reg + FOTG210_DMISGR0);
|
||||||
fotg210_done(ep, req, 0);
|
|
||||||
} else {
|
|
||||||
u32 value = ioread32(ep->fotg210->reg +
|
|
||||||
FOTG210_DMISGR0);
|
|
||||||
|
|
||||||
value &= ~DMISGR0_MCX_OUT_INT;
|
value &= ~DMISGR0_MCX_OUT_INT;
|
||||||
iowrite32(value, ep->fotg210->reg + FOTG210_DMISGR0);
|
iowrite32(value, ep->fotg210->reg + FOTG210_DMISGR0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fotg210_ep_queue(struct usb_ep *_ep, struct usb_request *_req,
|
static int fotg210_ep_queue(struct usb_ep *_ep, struct usb_request *_req,
|
||||||
|
Reference in New Issue
Block a user