Get stuck issue after open-close-open CAN device.

Signed-off-by: Wayne Lin <wosayttn@gmail.com>
This commit is contained in:
Wayne Lin 2020-04-27 10:25:36 +08:00
parent baa3145bfe
commit 5bddcd378e
1 changed files with 1 additions and 0 deletions

View File

@ -422,6 +422,7 @@ static rt_err_t rt_can_close(struct rt_device *dev)
tx_fifo = (struct rt_can_tx_fifo *)can->can_tx;
RT_ASSERT(tx_fifo != RT_NULL);
rt_sem_detach(&(tx_fifo->sem));
rt_free(tx_fifo);
dev->open_flag &= ~RT_DEVICE_FLAG_INT_TX;
can->can_tx = RT_NULL;