diff options
author | Jimmy Assarsson <jimmyassarsson@gmail.com> | 2017-10-24 13:23:28 +0300 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2017-10-24 14:00:23 +0300 |
commit | 8f65a923e6b628e187d5e791cf49393dd5e8c2f9 (patch) | |
tree | 60ba76f015b4c8c3ff1aadefd9b23cc9cf1044af | |
parent | 3a379f5b36ae039dfeb6f73316e47ab1af4945df (diff) | |
download | linux-8f65a923e6b628e187d5e791cf49393dd5e8c2f9.tar.xz |
can: kvaser_usb: Correct return value in printout
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: Jimmy Assarsson <jimmyassarsson@gmail.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r-- | drivers/net/can/usb/kvaser_usb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/can/usb/kvaser_usb.c b/drivers/net/can/usb/kvaser_usb.c index 18cc529fb807..861e90efab86 100644 --- a/drivers/net/can/usb/kvaser_usb.c +++ b/drivers/net/can/usb/kvaser_usb.c @@ -1609,7 +1609,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); |