serial/pty:Don't assert EBUSY when pty unregister driver

Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
This commit is contained in:
fangzhenwei 2022-02-10 14:38:37 +08:00 committed by Xiang Xiao
parent 88e871b13e
commit 84b88205ab

View File

@ -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;