summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.c')
-rw-r--r--nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.c b/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.c
index a78c5022e..31098a6e7 100644
--- a/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.c
+++ b/nuttx/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);