Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce9c95f1 authored by Wolfgang Grandegger's avatar Wolfgang Grandegger Committed by Greg Kroah-Hartman
Browse files

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: default avatarWolfgang Grandegger <wg@grandegger.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2431a63e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -430,7 +430,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)