linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] can: fix return value from can_get_bittiming()
@ 2014-04-23 20:10 Oliver Hartkopp
  2014-04-24 20:30 ` Marc Kleine-Budde
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Hartkopp @ 2014-04-23 20:10 UTC (permalink / raw)
  To: linux-can; +Cc: 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 <socketcan@hartkopp.net>
---
 drivers/net/can/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index c7a2604..e318e87 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -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
-- 
1.9.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] can: fix return value from can_get_bittiming()
  2014-04-23 20:10 [PATCH] can: fix return value from can_get_bittiming() Oliver Hartkopp
@ 2014-04-24 20:30 ` Marc Kleine-Budde
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2014-04-24 20:30 UTC (permalink / raw)
  To: Oliver Hartkopp, linux-can

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

On 04/23/2014 10:10 PM, Oliver Hartkopp wrote:
> 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 <socketcan@hartkopp.net>

Applied to can/master.

Tnx,
Marc

-- 
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   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 242 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-24 20:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-23 20:10 [PATCH] can: fix return value from can_get_bittiming() Oliver Hartkopp
2014-04-24 20:30 ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).