changeset 3953:e68724364949

usb/cdc-acm: allow char requests of size 0
author Alexandre Becoulet <alexandre.becoulet@free.fr>
date Wed, 06 Jun 2018 21:33:40 +0200
parents 01577c807d28
children 1564a79904d3
files drivers/char/usbdev_acm/usbdev_acm.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/drivers/char/usbdev_acm/usbdev_acm.c	Wed Jun 06 21:33:00 2018 +0200
+++ b/drivers/char/usbdev_acm/usbdev_acm.c	Wed Jun 06 21:33:40 2018 +0200
@@ -697,7 +697,11 @@
   struct device_s               *dev = accessor->dev;
   struct usbdev_acm_private_s   *pv = dev->drv_pv;
 
-  assert(rq->size);
+  if (rq->size == 0)
+    {
+      kroutine_exec(&rq->base.kr);
+      return;
+    }
 
   LOCK_SPIN_IRQ(&dev->lock);