diff --git a/drivers/can/can_common.c b/drivers/can/can_common.c index 8232052fa3a..942378e8245 100644 --- a/drivers/can/can_common.c +++ b/drivers/can/can_common.c @@ -183,6 +183,8 @@ static int update_sample_pnt(uint32_t total_tq, uint32_t sample_pnt, struct can_ if (tseg2 < min->phase_seg2) { return -ENOTSUP; } + } else { + /* Sample point location within range */ } res->phase_seg2 = tseg2; @@ -199,6 +201,8 @@ static int update_sample_pnt(uint32_t total_tq, uint32_t sample_pnt, struct can_ /* Even tseg1 distribution not possible, increase phase_seg1 */ res->phase_seg1 = min->phase_seg1; res->prop_seg = tseg1 - res->phase_seg1; + } else { + /* No redistribution necessary */ } /* Calculate the resulting sample point */