All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: linux-can@vger.kernel.org
Cc: kernel@pengutronix.de, Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH 11/11] can: gs_usb: gs_usb_disconnect(): remove not needed usb_kill_anchored_urbs()
Date: Tue, 18 Jul 2023 13:10:33 +0200	[thread overview]
Message-ID: <20230718-gs_usb-cleanups-v1-11-c3b9154ec605@pengutronix.de> (raw)
In-Reply-To: <20230718-gs_usb-cleanups-v1-0-c3b9154ec605@pengutronix.de>

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().

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/usb/gs_usb.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
index 5a0017b98532..6caf3974e028 100644
--- a/drivers/net/can/usb/gs_usb.c
+++ b/drivers/net/can/usb/gs_usb.c
@@ -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);
 }
 

-- 
2.40.1



      parent reply	other threads:[~2023-07-18 11:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18 11:10 [PATCH 00/11] can: gs_usb-cleanups: various clenaups Marc Kleine-Budde
2023-07-18 11:10 ` [PATCH 01/11] can: gs_usb: remove leading space from goto labels Marc Kleine-Budde
2023-07-18 11:10 ` [PATCH 02/11] can: gs_usb: gs_usb_probe(): align block comment Marc Kleine-Budde
2023-07-18 11:10 ` [PATCH 03/11] can: gs_usb: gs_usb_set_timestamp(): remove return statements form void function Marc Kleine-Budde
2023-07-18 11:10 ` [PATCH 04/11] can: gs_usb: uniformly use "parent" as variable name for struct gs_usb Marc Kleine-Budde
2023-07-18 11:10 ` [PATCH 05/11] can: gs_usb: gs_usb_receive_bulk_callback(): make use of netdev Marc Kleine-Budde
2023-07-18 11:10 ` [PATCH 06/11] can: gs_usb: gs_usb_receive_bulk_callback(): make use of stats Marc Kleine-Budde
2023-07-18 11:10 ` [PATCH 07/11] can: gs_usb: gs_usb_receive_bulk_callback(): count RX overflow errors also in case of OOM Marc Kleine-Budde
2023-07-18 11:10 ` [PATCH 08/11] can: gs_usb: gs_can_start_xmit(), gs_can_open(): clean up printouts in error path Marc Kleine-Budde
2023-07-18 11:10 ` [PATCH 09/11] cam: gs_usb: gs_can_close(): don't complain about failed device reset during ndo_stop Marc Kleine-Budde
2023-07-18 11:10 ` [PATCH 10/11] can: gs_usb: gs_destroy_candev(): remove not needed usb_kill_anchored_urbs() Marc Kleine-Budde
2023-07-18 11:10 ` Marc Kleine-Budde [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230718-gs_usb-cleanups-v1-11-c3b9154ec605@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.