]> git.baikalelectronics.ru Git - kernel.git/commit
can: bittiming: can_validate_bitrate(): simplify bit rate checking
authorMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 19 Dec 2019 09:17:37 +0000 (10:17 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 24 Feb 2022 07:26:03 +0000 (08:26 +0100)
commitf757e1478115fe208f3d80027b04dc8e4b92e6e6
tree38b2de39ca1fa38fa5f79e1fcc89270f3c561873
parent15ce8f3833d32fd11c65150a20256e88904a84d4
can: bittiming: can_validate_bitrate(): simplify bit rate checking

This patch simplifies the validation of the fixed bit rates. If a
supported bit rate is found, directly return 0.

If no valid bit rate is found return -EINVAL;

Link: https://lore.kernel.org/all/20220124215642.3474154-6-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev/bittiming.c