diff --git a/arch/arm/src/lpc214x/lpc214x_usbdev.c b/arch/arm/src/lpc214x/lpc214x_usbdev.c index a78c5022e7..31098a6e7f 100644 --- a/arch/arm/src/lpc214x/lpc214x_usbdev.c +++ b/arch/arm/src/lpc214x/lpc214x_usbdev.c @@ -1149,7 +1149,7 @@ static int lpc214x_rdrequest(struct lpc214x_ep_s *privep) */ privreq->req.xfrd += nbytesread; - if (privreq->req.len < privreq->req.xfrd || nbytesread < privep->ep.maxpacket) + if (privreq->req.xfrd >= privreq->req.len || nbytesread < privep->ep.maxpacket) { usbtrace(TRACE_COMPLETE(privep->epphy), privreq->req.xfrd); lpc214x_reqcomplete(privep, OK);