[smart] fixup rt_hw_serial_unregister_tty of serial tty
Mutex lock should be taken before release the TTY device. Signed-off-by: Shell <smokewood@qq.com>
This commit is contained in:
parent
57d157b8ab
commit
732d32be09
|
@ -358,6 +358,8 @@ rt_err_t rt_hw_serial_unregister_tty(struct rt_serial_device *serial)
|
|||
softc = tty_softc(tp);
|
||||
serial->rx_notify = softc->backup_notify;
|
||||
|
||||
tty_lock(tp);
|
||||
|
||||
tty_rel_gone(tp);
|
||||
|
||||
/* device unregister? */
|
||||
|
|
Loading…
Reference in New Issue