diff options
| author | Wayne Lin <[email protected]> | 2020-04-27 10:25:36 +0800 |
|---|---|---|
| committer | Wayne Lin <[email protected]> | 2020-04-27 16:01:05 +0800 |
| commit | 5bddcd378e18f838e8f9126f615bae42b0c37c9c (patch) | |
| tree | f1af6d35848573bb69daffeeee8cf48b57ca9c3f /components/drivers | |
| parent | baa3145bfe61b3330b6a160523cc5470fa5db3a7 (diff) | |
Get stuck issue after open-close-open CAN device.
Signed-off-by: Wayne Lin <[email protected]>
Diffstat (limited to 'components/drivers')
| -rw-r--r-- | components/drivers/can/can.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/components/drivers/can/can.c b/components/drivers/can/can.c index 3d60dbaa55..9f4612355b 100644 --- a/components/drivers/can/can.c +++ b/components/drivers/can/can.c @@ -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; |
