From patchwork Tue Jun 25 16:46:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lizhe X-Patchwork-Id: 807484 Received: from m15.mail.163.com (m15.mail.163.com [45.254.50.219]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DBC3A16E863; Tue, 25 Jun 2024 16:47:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.254.50.219 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719334049; cv=none; b=VX6cyFLrst3kvdc/1kJ2wPkrVFGFHR1WMDGMXCRye582S6G5DTM3WZLmGROzbW7FyOAHFqjhBpB1rPSX/LBIFD57iQBBDkdsZhc5Ko2TzZ146TlmOThu1NpVbQ3HyJ1WSSqDgkDqalRzNBgDq/qaL26HDOJVqmLZUbZhUfc2Fjk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719334049; c=relaxed/simple; bh=auLPFsUwMAOX84W1PHZS+Fnr/WAtAk6hqRYSvkhLEuo=; h=From:To:Cc:Subject:Date:Message-Id; b=PfCfCFg9TLGOytyw+67HujMl5jnBkRhP5OfFAKCUXflF4ab/dUsdyO4+uSFaHa2sRGyfxfbDDR0ZJ7dcKaWp+GRpzxhhQwIenmsCsRQhQG4byt5m8EpgTjiJj8dSWZREWKQhZPxwIqFGMdVo+5FssTmju9fz4qzSTjuVycKr8jU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=l2wpGJ9p; arc=none smtp.client-ip=45.254.50.219 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="l2wpGJ9p" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=pD8lAwlY54XK1J8UOK tOe+VXizuIZB6XckcwJU5V9oE=; b=l2wpGJ9ppBIjCMChIyfUatO9DW9bhK936M uhCVwYkaKsCcRUFi8HmvjMIetKUWzqcjuAC6mn05jxiUPfMg2+6LfLh5dNBcE+Ma CSRCOkwdilRlyeSn8GTiFK4IGysxjvd+soRU3WdHw2lrj6R0+ugAaJCkelS/uNtX zlJZDmuo0= Received: from localhost.localdomain (unknown [114.92.93.163]) by gzga-smtp-mta-g0-1 (Coremail) with SMTP id _____wD3nxlb9Hpm6dHMAQ--.46011S2; Wed, 26 Jun 2024 00:46:27 +0800 (CST) From: Lizhe 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 Subject: [PATCH] USB: hub:no need to obtain usb device Date: Tue, 25 Jun 2024 09:46:07 -0700 Message-Id: <20240625164607.3367-1-sensor1010@163.com> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: _____wD3nxlb9Hpm6dHMAQ--.46011S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7Jw43Kr4xtrW7uF1Dtw17Awb_yoW3XFbE9a 1Uuayxuw18tFyxKr1UZw1FvrW2kw4avrnFvFZ0qry3ZFyYqr17urWDX392yF15ArW7Cr9x JFyq9r15ur40vjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRt189JUUUUU== X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/1tbiEAUJq2XAlnThXgAAsP Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: the usb device connected to the port has obtained. there is no need to obtain it again. Signed-off-by: Lizhe --- 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