summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJimmy Assarsson <jimmyassarsson@gmail.com>2017-10-24 12:23:28 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-11-02 09:49:14 +0100
commit636e798d14830dac52b3525fc4136c5bd8f0fb84 (patch)
tree3f670bbd4733b923604bc5ac4c0043f5a83d8547 /drivers/net
parentc4fe13bd538e3f5c6e998d25d4b176fcd6166c94 (diff)
downloadlinux-stable-636e798d14830dac52b3525fc4136c5bd8f0fb84.tar.gz
linux-stable-636e798d14830dac52b3525fc4136c5bd8f0fb84.tar.bz2
linux-stable-636e798d14830dac52b3525fc4136c5bd8f0fb84.zip
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: Jimmy Assarsson <jimmyassarsson@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/can/usb/kvaser_usb.c3
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 d51e0c401b48..0c4364ceb79c 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);