From d5f07eb8c9d0356e61668716bffb4de490dbc8ff Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Fri, 9 May 2025 09:53:57 +0000 Subject: [PATCH] drivers: can: common: terminate if ... else if ... constructs with else Terminate "if ... else if ..." constructs with an empty "else" clause to indicate that consideration has been given regarding the behaviour when all other conditions evaluate to false. Signed-off-by: Henrik Brix Andersen --- drivers/can/can_common.c | 4 ++++ 1 file changed, 4 insertions(+) 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 */