diff --git a/drivers/serial/ptmx.c b/drivers/serial/ptmx.c index cf372e0a65..05548df46c 100644 --- a/drivers/serial/ptmx.c +++ b/drivers/serial/ptmx.c @@ -220,7 +220,7 @@ static int ptmx_open(FAR struct file *filep) */ ret = unregister_driver(devname); - DEBUGASSERT(ret >= 0); /* unregister_driver() should never fail */ + DEBUGASSERT(ret >= 0 || ret == -EBUSY); /* unregister_driver() should never fail */ nxsem_post(&g_ptmx.px_exclsem); return OK;