From nobody Sun Dec 14 06:20:40 2025 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 0EE59C00140 for ; Mon, 15 Aug 2022 19:24:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244951AbiHOTYW (ORCPT ); Mon, 15 Aug 2022 15:24:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344800AbiHOTVk (ORCPT ); Mon, 15 Aug 2022 15:21:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9968B39B80; Mon, 15 Aug 2022 11:40: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 ams.source.kernel.org (Postfix) with ESMTPS id B99EFB81092; Mon, 15 Aug 2022 18:40:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC08EC433D6; Mon, 15 Aug 2022 18:40:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588829; bh=wh6oA0bfx8XoMes9N0kUyWQLjD1kB7YEXaTdqVFx3jM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KSpg9xf1W0QEnDsCGNbPn/naDn4ceV+PszL6WIDBU0eoL2lkPc1NHQbaWV++J+Fop GNJGlm23oP5cfl++iAOk6pyERnZQAnc3FCkD1Ua8NZR9T/6NPYISzfzs+Wg1nMftNs SUjX2RQBEzhQ/rlDnDURU7CG5vJe8vY0pM1IPPD4= 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.15 496/779] phy: stm32: fix error return in stm32_usbphyc_phy_init Date: Mon, 15 Aug 2022 20:02:20 +0200 Message-Id: <20220815180358.486937276@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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 da05642d3bd4..cd0747ab6267 100644 --- a/drivers/phy/st/phy-stm32-usbphyc.c +++ b/drivers/phy/st/phy-stm32-usbphyc.c @@ -279,7 +279,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