]> git.itanic.dy.fi Git - linux-stable/commitdiff
can: gs_usb: gs_usb_disconnect(): remove not needed usb_kill_anchored_urbs()
authorMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 6 Jul 2023 09:38:25 +0000 (11:38 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 28 Jul 2023 07:43:46 +0000 (09:43 +0200)
In gs_usb_disconnect(), all channels are destroyed first, then all
anchored RX URBs (parent->rx_submitted) are disposed with
usb_kill_anchored_urbs().

The call to usb_kill_anchored_urbs() is not needed, as
gs_destroy_candev() of the last active channel already disposes the RX
URBS.

Remove not needed call to usb_kill_anchored_urbs() from
gs_usb_disconnect().

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

index 5a0017b9853212ebe27876316d593ce8c6f4249a..6caf3974e0283ed27731d9891eb6149e0591f171 100644 (file)
@@ -1471,7 +1471,6 @@ static void gs_usb_disconnect(struct usb_interface *intf)
                if (parent->canch[i])
                        gs_destroy_candev(parent->canch[i]);
 
-       usb_kill_anchored_urbs(&parent->rx_submitted);
        kfree(parent);
 }