From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 167E5347FD9 for ; Fri, 20 Feb 2026 13:43:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771595008; cv=none; b=CK9wzUFIAhKOiMaCpglMavebiOpWYXNEU3P/HPMzBMGnt4F8TWWLoM4B1/Vgbi6d9RYOM1u//C03OEJ0FpSsVZqkD8Wj8oamh3VL7gVkyRO/fihyYm2pr41+Ndbo7aFtNFFA5YcmLQqL639135eeAAChsYYHIERb53VOdBbSjFA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771595008; c=relaxed/simple; bh=8PHKNDDYkpPLT2AcX1kZ8sOQUJ7L+sYJLMMawkbhe3k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=DGHgwwmCwb52kYYHIeiTtD84y+EZKHzpEQkxuz9zl1qdDYGgnSI2yEdCAJJgmS0KjeNCwgGFUDRuirETQIZOEJZ+V86xDTAcUnHsFEkcAwyrRchk4KOmdaeC6UhF7TwRgwTW6e4UVEXJB7dxVc8jhn/Bw9t9S+vtDZJIqbPHgfs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=bgRastPA; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="bgRastPA" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 0A3DFC19D14; Fri, 20 Feb 2026 13:43:37 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 1F0115FA8F; Fri, 20 Feb 2026 13:43:24 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id BE11C10368CAB; Fri, 20 Feb 2026 14:43:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1771595003; h=from:subject:date:message-id:to:cc:mime-version:content-type: in-reply-to:references; bh=8PHKNDDYkpPLT2AcX1kZ8sOQUJ7L+sYJLMMawkbhe3k=; b=bgRastPAxZ3zRJDC/G92pIGVWfng7ovHiOr0NlFmtw1inUQ3L4Z3Oj2MYVmSvsnpOnzk6Y NFsST5k0/zABkvnpjjkojTRh34xF8N0aHHWvVLE9YFsZglKOULCSf/qS/2sHDEm4ZAyHc/ y0OrDfjqkjHeE877fFnhwjbMTFgJnbg253kwUahTjooZVRRn8RMjU9KbWBkZzlbRD9sS9A SFVoMqNyEWxuk5FdKfFkwPUwLjwaCKHyb2GNIz3R0+SjzIH4NaxO741jnsa8q1jt6nh/OP vf3WfBOaQFZWVmXiJlQ0B9X7fIxpv46r657vSgk8HhmW/E/TfCcF2mvxt1SKtw== From: Miquel Raynal To: Gabor Juhos Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] usb: core: don't power off roothub PHYs if phy_set_mode() fails In-Reply-To: <20260218-usb-phy-poweroff-fix-v1-1-66e6831e860e@gmail.com> (Gabor Juhos's message of "Wed, 18 Feb 2026 21:21:07 +0100") References: <20260218-usb-phy-poweroff-fix-v1-1-66e6831e860e@gmail.com> User-Agent: mu4e 1.12.7; emacs 30.2 Date: Fri, 20 Feb 2026 14:43:22 +0100 Message-ID: <87bjhjsf7p.fsf@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Last-TLS-Session-Version: TLSv1.3 On 18/02/2026 at 21:21:07 +01, Gabor Juhos wrote: > Remove the error path from the usb_phy_roothub_set_mode() function. > The code is clearly wrong, because phy_set_mode() calls can't be > balanced with phy_power_off() calls. > > Additionally, the usb_phy_roothub_set_mode() function is called only > from usb_add_hcd() before it powers on the PHYs, so powering off those > makes no sense anyway. > > Presumably, the code is copy-pasted from the phy_power_on() function > without adjusting the error handling. > > Cc: stable@vger.kernel.org # v5.1+ > Fixes: b97a31348379 ("usb: core: comply to PHY framework") > Signed-off-by: Gabor Juhos Reviewed-by: Miquel Raynal