can: fix return value from can_get_bittiming()
PATCH 1/1 can: fix return value from can_get_bittiming()
When trying to set a data bitrate on non CAN FD devices the 'ip' tool answers with:
RTNETLINK answers: Unknown error 524
Rename '-ENOTSUPP' to '-EOPNOTSUPP' so that 'ip' answers correctly:
RTNETLINK answers: Operation not supported
Signed-off-by Oliver Hartkopp <[email protected]>
--- drivers/net/can/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/dev.c +1 -1
@@ -256,7 +256,7 @@ static int can_get_bittiming(struct net_device *dev, struct can_bittiming *bt,/* Check if the CAN device has bit-timing parameters */ if (!btc) -return -ENOTSUPP ; +return -EOPNOTSUPP ;/* * Depending on the given can_bittiming parameter structure the CAN
Signature · 1 line
1.9.2
Quoted 10 lines · Oliver Hartkopp
When trying to set a data bitrate on non CAN FD devices the 'ip' tool answers with:
RTNETLINK answers: Unknown error 524
Rename '
-ENOTSUPP' to '-EOPNOTSUPP' so that 'ip' answers correctly:RTNETLINK answers: Operation not supported
Signed-off-by Oliver Hartkopp <[email protected]>
Applied to can/master.
Tnx,
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |