Commit c7f755b2 authored by Fabian Vogt's avatar Fabian Vogt Committed by Greg Kroah-Hartman
Browse files

fotg210-udc: Remove a dubious condition leading to fotg210_done



When the EP0 IN request was not completed but less than a packet sent,
it would complete the request successfully. That doesn't make sense
and can't really happen as fotg210_start_dma always sends
min(length, maxpkt) bytes.

Fixes: b84a8dee ("usb: gadget: add Faraday fotg210_udc driver")
Signed-off-by: default avatarFabian Vogt <fabian@ritter-vogt.de>
Link: https://lore.kernel.org/r/20210324141115.9384-4-fabian@ritter-vogt.de


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 078ba935
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -379,8 +379,7 @@ static void fotg210_ep0_queue(struct fotg210_ep *ep,
	}
	if (ep->dir_in) { /* if IN */
		fotg210_start_dma(ep, req);
		if ((req->req.length == req->req.actual) ||
		    (req->req.actual < ep->ep.maxpacket))
		if (req->req.length == req->req.actual)
			fotg210_done(ep, req, 0);
	} else { /* OUT */
		u32 value = ioread32(ep->fotg210->reg + FOTG210_DMISGR0);