mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
can: kvaser_usb: Correct return value in printout
commit 8f65a923e6 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0c3cdb4536
commit
c1b0921021
@@ -1607,7 +1607,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);
|
||||
|
||||
Reference in New Issue
Block a user