]> git.itanic.dy.fi Git - linux-stable/commit
can: bittiming: can_calc_bittiming(): convert from netdev_err() to NL_SET_ERR_MSG_FMT()
authorMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 31 Jan 2023 16:10:54 +0000 (17:10 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 6 Feb 2023 12:57:27 +0000 (13:57 +0100)
commit06742086a3d225cafa3ee9d7704bbfd28a0d01d4
tree7680329ee56039324ba3bfdf711231fc5ce6dce0
parentc7650728a7024e4f835dcbbb4214740939179596
can: bittiming: can_calc_bittiming(): convert from netdev_err() to NL_SET_ERR_MSG_FMT()

Replace the netdev_err() by NL_SET_ERR_MSG_FMT() to better inform the
user about the problem. While there, use %u to print unsigned values
and improve error message a bit.

In case of an error, return -EINVAL instead of -EDOM, this corresponds
better to the actual meaning of the error value.

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