]> git.itanic.dy.fi Git - linux-stable/commit
can: gs_usb: gs_can_close(): don't complain about failed device reset during ndo_stop
authorMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 8 Feb 2023 09:26:33 +0000 (10:26 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 28 Jul 2023 07:43:40 +0000 (09:43 +0200)
commit5c6c313acdfc3455b20ac1dc9655aa4afcf51ab1
treeffee54d6683d446d527ce30340c1840b634dcae5
parent1494ffe4cbe0f97af9c57a4cc37131c8efbe79fc
can: gs_usb: gs_can_close(): don't complain about failed device reset during ndo_stop

When the USB device is unplugged, gs_can_close() (which implements the
struct net_device_ops::ndo_stop callback) is called. In this function
an attempt is made to shut down the USB device with a USB control
message. For disconnected devices this will fail and a warning message
is printed.

Silence the driver by removing the printout of the error message if
the reset command fails.

Link: https://lore.kernel.org/all/20230718-gs_usb-cleanups-v1-9-c3b9154ec605@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/gs_usb.c