From: Oliver Hartkopp Date: Wed, 23 Apr 2014 20:10:55 +0000 (+0200) Subject: can: fix return value from can_get_bittiming() X-Git-Tag: v4.9.8~6428^2~39^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d482443244b820f03a5a07d1bca6a0f5e2b4804c;p=platform%2Fkernel%2Flinux-rpi3.git 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 Signed-off-by: Marc Kleine-Budde --- 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