Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3087617rwb; Mon, 15 Aug 2022 17:49:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR5KMuC3FQI0pRrTPFadYBbkqsbYDAxMILtQdE2vpUFTL3m8OQhOQzlCo1wyLtNp3wbu8jBK X-Received: by 2002:a17:907:d8d:b0:730:a937:fb01 with SMTP id go13-20020a1709070d8d00b00730a937fb01mr11516641ejc.246.1660610978854; Mon, 15 Aug 2022 17:49:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610978; cv=none; d=google.com; s=arc-20160816; b=oZrqKrFHxSRjfEFaF2pP9ZKrlcv9QN6mI6R0+ty/wxxBj/tpql4kbGqb1+TqeEgiSF oLbfJzLyg0RcP2oXgdGT7nXctfb4/0J92WmxQU8O9Evfq6Wt3v0YGH7bnSbBGMdhPyVd U2/jRmgzNWJWqdtdcdsyc9O/DqIsc55X5uLWDfmBfYGGHmF9QGJQ/wkMrOhpjT/eybmr s8gNjh2Bn6b2uh5qMUSIW9UhEPPnhtzr8N7HzQ3eVUM5z3v1XoaGh3w2H3qIbJwb46ll npG/PIF1fBRROB5ToraLaTB0UCBhKf8OZJOXGTSbXRfv+p9daFVPx242vBS13P77EGXG 6RGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=L2HxWa8n3iSFI3hcVgopTE+3kRA+HWjzc8ZuRUAusxA=; b=xSWLNnskpJl6ouqb5DzNuGiwxlCBsFd8+w5bkIlW0zFRpvOyxlVeA2feHS82T0U5gf V/Hb/RT2gCO0VpXkeAodVxKm7aotLu8Lz1gB+CwNpT8t0SEG0Z5iMChn0OWdsXH4cHgE eOOlFlomrdrlvIiEY2ec6LvjBhVrC1/sHWv8Ls4HXG3bfIrPjxYuwkQo2aGoE1aysy+N hlMEtpLxciHyy0GlPflR12ogo4vctm0mucaV2XnP4tSrUW09bBB7NcwwoY2lr95vk6xX EseAG7Mu1VMMHT6zQOL7Mw09npfZyhASADXb/rQvqxJ7eD5fI/zZ1YY67DYZRk/sdETM NrRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uJ3+QGAx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g3-20020a1709065d0300b0073301a22cd5si10097082ejt.738.2022.08.15.17.49.13; Mon, 15 Aug 2022 17:49:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uJ3+QGAx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352402AbiHPAYF (ORCPT + 99 others); Mon, 15 Aug 2022 20:24:05 -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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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@foss.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; pll_disable: - return stm32_usbphyc_pll_disable(usbphyc); + stm32_usbphyc_pll_disable(usbphyc); + + return ret; } static int stm32_usbphyc_phy_exit(struct phy *phy) -- 2.35.1