Commit 245c1c90 authored by Jimmy Assarsson's avatar Jimmy Assarsson Committed by Thadeu Lima de Souza Cascardo

can: kvaser_usb: Correct return value in printout

BugLink: http://bugs.launchpad.net/bugs/1731882

commit 8f65a923 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>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
parent b5ec9208
...@@ -1607,7 +1607,8 @@ static int kvaser_usb_close(struct net_device *netdev) ...@@ -1607,7 +1607,8 @@ static int kvaser_usb_close(struct net_device *netdev)
if (err) if (err)
netdev_warn(netdev, "Cannot flush queue, error %d\n", 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); netdev_warn(netdev, "Cannot reset card, error %d\n", err);
err = kvaser_usb_stop_chip(priv); err = kvaser_usb_stop_chip(priv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment