From 84b88205aba6467883c61dfb5668f725559a88ef Mon Sep 17 00:00:00 2001 From: fangzhenwei Date: Thu, 10 Feb 2022 14:38:37 +0800 Subject: [PATCH] serial/pty:Don't assert EBUSY when pty unregister driver Signed-off-by: fangzhenwei --- drivers/serial/ptmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;