From nobody Sat Feb 7 17:59:27 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 860CCC00140 for ; Mon, 15 Aug 2022 22:12:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344386AbiHOWM1 (ORCPT ); Mon, 15 Aug 2022 18:12:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244075AbiHOWKL (ORCPT ); Mon, 15 Aug 2022 18:10:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 005EB118DDC; Mon, 15 Aug 2022 12:38:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A185260BC2; Mon, 15 Aug 2022 19:38:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94CFCC433C1; Mon, 15 Aug 2022 19:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660592285; bh=BWdZqPLDXsnad35DrHwcE33hAm8J1xbYtk0RGyawOr4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BThENeyXsNigqO2x4HQ7fWfRyukkcDN3hrM9lCZlASxQ62IV1Ylqohws9WV87M9Q2 PxGZX3kN2TBG0DHPs8hEPl3YHdNZNPE1xavE2gxd8gbhEI3nfiNIZcrYipMDU+7eAv KVfJhfM11rloJnlSGcqg1gdAR+kRe9wrEu12RnFw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Fabrice Gasnier , Vinod Koul , Sasha Levin Subject: [PATCH 5.18 0760/1095] phy: stm32: fix error return in stm32_usbphyc_phy_init Date: Mon, 15 Aug 2022 20:02:39 +0200 Message-Id: <20220815180500.716285659@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Fabrice Gasnier [ Upstream commit 32b378a9179ae4db61cfc5d502717214e6cd1e1c ] Error code is overridden, in case the PLL doesn't lock. So, the USB initialization can continue. This leads to a platform freeze. This can be avoided by returning proper error code to avoid USB probe freezing the platform. It also displays proper errors in log. Fixes: 5b1af71280ab ("phy: stm32: rework PLL Lock detection") Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20220713133953.595134-1-fabrice.gasnier@fos= s.st.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/phy/st/phy-stm32-usbphyc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/phy/st/phy-stm32-usbphyc.c b/drivers/phy/st/phy-stm32-= usbphyc.c index 007a23c78d56..a98c911cc37a 100644 --- a/drivers/phy/st/phy-stm32-usbphyc.c +++ b/drivers/phy/st/phy-stm32-usbphyc.c @@ -358,7 +358,9 @@ static int stm32_usbphyc_phy_init(struct phy *phy) return 0; =20 pll_disable: - return stm32_usbphyc_pll_disable(usbphyc); + stm32_usbphyc_pll_disable(usbphyc); + + return ret; } =20 static int stm32_usbphyc_phy_exit(struct phy *phy) --=20 2.35.1