From 780c81f1307918de1d110575e3068426bbc34cee Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 8 May 2015 10:58:41 -0600 Subject: [PATCH] USB host CDC/ACM fixes. Still kind of buggy --- arch/arm/src/lpc17xx/lpc17_usbhost.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/src/lpc17xx/lpc17_usbhost.c b/arch/arm/src/lpc17xx/lpc17_usbhost.c index b314e7029e0..f195c0ed757 100644 --- a/arch/arm/src/lpc17xx/lpc17_usbhost.c +++ b/arch/arm/src/lpc17xx/lpc17_usbhost.c @@ -3220,15 +3220,15 @@ static int lpc17_cancel(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) irqstate_t flags; int ret = OK; + DEBUGASSERT(ed != NULL); + /* These first steps must be atomic as possible */ - flags = irqsave(); + flags = irqsave(); - /* It might be possible for no transfer to be in progress */ + /* It is possible there there is no transfer to be in progress */ - DEBUGASSERT(ed != NULL && ed->xfrinfo != NULL); xfrinfo = ed->xfrinfo; - if (xfrinfo) { /* It would be an usage error to use the interface to try to cancel a