From 456a258c23de53b578419d66b631507aefb7ba06 Mon Sep 17 00:00:00 2001 From: Michael Jung Date: Sat, 21 Apr 2018 06:39:14 -0600 Subject: [PATCH] /arch/arm/src/lpc17xx: Fix USB device endpoint allocatin bookkeeping. --- arch/arm/src/lpc17xx/lpc17_usbdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/lpc17xx/lpc17_usbdev.c b/arch/arm/src/lpc17xx/lpc17_usbdev.c index 5bcf3735b70..05e69e7f2b9 100644 --- a/arch/arm/src/lpc17xx/lpc17_usbdev.c +++ b/arch/arm/src/lpc17xx/lpc17_usbdev.c @@ -3042,7 +3042,7 @@ static FAR struct usbdev_ep_s *lpc17_allocep(FAR struct usbdev_s *dev, uint8_t e { /* Mark the IN/OUT endpoint no longer available */ - priv->epavail &= ~(3 << (bit & ~1)); + priv->epavail &= ~(3 << (epndx & ~1)); leave_critical_section(flags); /* And return the pointer to the standard endpoint structure */