diff options
author | Jimmy Assarsson <jimmyassarsson@gmail.com> | 2017-10-24 12:23:28 +0200 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2017-11-05 23:54:38 -0500 |
commit | a8bd849fd6ec8c7a8215877ee890e9b66f13c76d (patch) | |
tree | de8fe9c25c3b340f602286eb51e6a41c88d6439c | |
parent | 5195d13e883d59f6bbfb997775991af39a28f3d1 (diff) |
can: kvaser_usb: Correct return value in printout
[ Upstream commit 8f65a923e6b628e187d5e791cf49393dd5e8c2f9 ]
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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
-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 8b17a9065b0b..4700485c2782 100644 --- a/drivers/net/can/usb/kvaser_usb.c +++ b/drivers/net/can/usb/kvaser_usb.c @@ -1608,7 +1608,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); |