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 <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2025-05-09 09:53:57 +00:00 committed by Benjamin Cabé
commit d5f07eb8c9

View file

@ -183,6 +183,8 @@ static int update_sample_pnt(uint32_t total_tq, uint32_t sample_pnt, struct can_
if (tseg2 < min->phase_seg2) { if (tseg2 < min->phase_seg2) {
return -ENOTSUP; return -ENOTSUP;
} }
} else {
/* Sample point location within range */
} }
res->phase_seg2 = tseg2; 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 */ /* Even tseg1 distribution not possible, increase phase_seg1 */
res->phase_seg1 = min->phase_seg1; res->phase_seg1 = min->phase_seg1;
res->prop_seg = tseg1 - res->phase_seg1; res->prop_seg = tseg1 - res->phase_seg1;
} else {
/* No redistribution necessary */
} }
/* Calculate the resulting sample point */ /* Calculate the resulting sample point */