From nobody Sat Feb 7 06:46:59 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 6CF43C00140 for ; Tue, 16 Aug 2022 00:24:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351177AbiHPAYH (ORCPT ); Mon, 15 Aug 2022 20:24:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353070AbiHPAUX (ORCPT ); Mon, 15 Aug 2022 20:20:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 217AD17B819; Mon, 15 Aug 2022 13:33:32 -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 14073611AA; Mon, 15 Aug 2022 20:33:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D06FC433C1; Mon, 15 Aug 2022 20:33:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595596; bh=BWdZqPLDXsnad35DrHwcE33hAm8J1xbYtk0RGyawOr4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uJ3+QGAxdvOuq2EbSYqCw1LfVDZXX0RBsWTpxi3laEuRFpvRCsctGVkRu85uQBow2 HLJbhu1BmwzGtqCNpKVmV56AYb1Wu05Z6HKEejQsVoClvy++VblpXsmjnIHY8bKgyX x8kDXofiCGG/GaRLLsOWkSU4qytARH4FcOJEC49Q= 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.19 0814/1157] phy: stm32: fix error return in stm32_usbphyc_phy_init Date: Mon, 15 Aug 2022 20:02:50 +0200 Message-Id: <20220815180512.052610482@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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