can: dev: register_candev(): ensure that bittiming const are valid
authorMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 9 Aug 2021 19:07:14 +0000 (21:07 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 6 Feb 2023 12:57:26 +0000 (13:57 +0100)
commitd58ac89d0d388da82630bb9d3823420cddbdabb2
tree8409778dbe570612f6856bea888ce5a91913aeae
parent8e0a0b32c4ff7a5c2654a5f8fc37a9f1b6f58816
can: dev: register_candev(): ensure that bittiming const are valid

Implement the function can_bittiming_const_valid() to check the
validity of the specified bit timing constant. Call this function from
register_candev() to check the bit timing constants during the
registration of the CAN interface.

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