Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4824432 authored by Oliver Hartkopp's avatar Oliver Hartkopp Committed by Marc Kleine-Budde
Browse files

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: default avatarOliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent a9edcded
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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