summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorWolfgang Grandegger <wg@grandegger.com>2017-12-13 21:52:23 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2018-01-04 18:14:38 +0300
commitd5b42e6607661b198d8b26a0c30969605b1bf5c7 (patch)
treea5b41db4955ac91ee71657ab16619f670a80edfb /drivers/net
parentb4c2951a4833e66f1bbfe65ddcd4fdcdfafe5e8f (diff)
downloadlinux-d5b42e6607661b198d8b26a0c30969605b1bf5c7.tar.xz
can: gs_usb: fix return value of the "set_bittiming" callback
The "set_bittiming" callback treats a positive return value as error! For that reason "can_changelink()" will quit silently after setting the bittiming values without processing ctrlmode, restart-ms, etc. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/can/usb/gs_usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
index 68ac3e88a8ce..8bf80ad9dc44 100644
--- a/drivers/net/can/usb/gs_usb.c
+++ b/drivers/net/can/usb/gs_usb.c
@@ -449,7 +449,7 @@ static int gs_usb_set_bittiming(struct net_device *netdev)
dev_err(netdev->dev.parent, "Couldn't set bittimings (err=%d)",
rc);
- return rc;
+ return (rc > 0) ? 0 : rc;
}
static void gs_usb_xmit_callback(struct urb *urb)