summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/dev.c
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2014-04-23 22:10:55 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2014-04-24 22:30:39 +0200
commitd482443244b820f03a5a07d1bca6a0f5e2b4804c (patch)
treec0ac6fbf063907aa48578c039e85090712651568 /drivers/net/can/dev.c
parentcan: sja1000_isa: add locking for indirect register access mode (diff)
downloadlinux-d482443244b820f03a5a07d1bca6a0f5e2b4804c.tar.xz
linux-d482443244b820f03a5a07d1bca6a0f5e2b4804c.zip
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 <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/dev.c')
-rw-r--r--drivers/net/can/dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index c7a260478749..e318e87e2bfc 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