aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src/can.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/src/can.c')
-rw-r--r--os/hal/src/can.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/hal/src/can.c b/os/hal/src/can.c
index a57f12356..3f1f7588f 100644
--- a/os/hal/src/can.c
+++ b/os/hal/src/can.c
@@ -131,10 +131,10 @@ void canStop(CANDriver *canp) {
chDbgAssert((canp->state == CAN_STOP) || (canp->state == CAN_READY),
"canStop(), #1", "invalid state");
can_lld_stop(canp);
+ canp->state = CAN_STOP;
chSemResetI(&canp->rxsem, 0);
chSemResetI(&canp->txsem, 0);
chSchRescheduleS();
- canp->state = CAN_STOP;
chSysUnlock();
}