can: kvaser_usb: Don't send a RESET_CHIP for non-existing channels
authorAhmed S. Darwish <ahmed.darwish@valeo.com>
Mon, 5 Jan 2015 17:57:13 +0000 (12:57 -0500)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:06:03 +0000 (13:06 +0000)
commitf55a47b76b0bc022c82553a8c1d58c889b22ae38
tree0ae90addfab0e8b7ceb95d60b99f394c02f9c16a
parent22c02c7ee32781d4e2112a9da14e78e6aa380136
can: kvaser_usb: Don't send a RESET_CHIP for non-existing channels

commit 5e7e6e0c9b47a45576c38b4a72d67927a5e049f7 upstream.

Recent Leaf firmware versions (>= 3.1.557) do not allow to send
commands for non-existing channels.  If a command is sent for a
non-existing channel, the firmware crashes.

Reported-by: Christopher Storah <Christopher.Storah@invetech.com.au>
Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: Ahmed S. Darwish <ahmed.darwish@valeo.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/usb/kvaser_usb.c