OSDN Git Service

can: gs_usb: fix return value of the "set_bittiming" callback
authorWolfgang Grandegger <wg@grandegger.com>
Wed, 13 Dec 2017 18:52:23 +0000 (19:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jan 2018 08:38:49 +0000 (09:38 +0100)
commit02f201f78fb9da5d140abc17cf9b3a196b1b42dd
tree8c2102b37a516ff8cdc39c561978edfd5414f27b
parentc781e3be97a1cbeef8c853101e8f266db556b0a3
can: gs_usb: fix return value of the "set_bittiming" callback

commit d5b42e6607661b198d8b26a0c30969605b1bf5c7 upstream.

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>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/usb/gs_usb.c