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

Commit 56621bc7 authored by Jimmy Assarsson's avatar Jimmy Assarsson Committed by Greg Kroah-Hartman
Browse files

can: kvaser_usb: Correct return value in printout



commit 8f65a923e6b628e187d5e791cf49393dd5e8c2f9 upstream.

If the return value from kvaser_usb_send_simple_msg() was non-zero, the
return value from kvaser_usb_flush_queue() was printed in the kernel
warning.

Signed-off-by: default avatarJimmy Assarsson <jimmyassarsson@gmail.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 72426053
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1251,7 +1251,8 @@ static int kvaser_usb_close(struct net_device *netdev)
	if (err)
		netdev_warn(netdev, "Cannot flush queue, error %d\n", err);

	if (kvaser_usb_send_simple_msg(dev, CMD_RESET_CHIP, priv->channel))
	err = kvaser_usb_send_simple_msg(dev, CMD_RESET_CHIP, priv->channel);
	if (err)
		netdev_warn(netdev, "Cannot reset card, error %d\n", err);

	err = kvaser_usb_stop_chip(priv);