All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lizhe <sensor1010@163.com>
To: gregkh@linuxfoundation.org, stern@rowland.harvard.edu,
	hgajjar@de.adit-jv.com, stanley_chang@realtek.com,
	ricardo.canuelo@collabora.com, johan+linaro@kernel.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Lizhe <sensor1010@163.com>
Subject: [PATCH] USB: hub:no need to obtain usb device
Date: Tue, 25 Jun 2024 09:46:07 -0700	[thread overview]
Message-ID: <20240625164607.3367-1-sensor1010@163.com> (raw)

the usb device connected to the port has obtained.
there is no need to obtain it again.

Signed-off-by: Lizhe <sensor1010@163.com>
---
 drivers/usb/core/hub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 4b93c0bd1d4b..f37b991fa86a 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -5358,7 +5358,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
 	if (udev) {
 		if (hcd->usb_phy && !hdev->parent)
 			usb_phy_notify_disconnect(hcd->usb_phy, udev->speed);
-		usb_disconnect(&port_dev->child);
+		usb_disconnect(&udev);
 	}
 
 	/* We can forget about a "removed" device when there's a physical
-- 
2.17.1


             reply	other threads:[~2024-06-25 16:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-25 16:46 Lizhe [this message]
2024-06-25 16:52 ` [PATCH] USB: hub:no need to obtain usb device Alan Stern
2024-06-25 17:50 ` Greg KH

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=20240625164607.3367-1-sensor1010@163.com \
    --to=sensor1010@163.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hgajjar@de.adit-jv.com \
    --cc=johan+linaro@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=ricardo.canuelo@collabora.com \
    --cc=stanley_chang@realtek.com \
    --cc=stern@rowland.harvard.edu \
    /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.