From patchwork Wed Oct 19 08:30:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4801 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp216378wrs; Wed, 19 Oct 2022 02:18:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6SNRHeLebEK0aPL+bExXnWgZn6aSRK8g3EGV0k1QYUmxAejWqprPDLhFQCyhMlt4jYgZZE X-Received: by 2002:a17:907:783:b0:76e:f290:8b5 with SMTP id xd3-20020a170907078300b0076ef29008b5mr6076239ejb.395.1666171095638; Wed, 19 Oct 2022 02:18:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666171095; cv=none; d=google.com; s=arc-20160816; b=bCrf6L1xWvGobGDQ4Hw+aShl5/Ko3nQbeR3uvTkqdtmyHpVNZvpN8AiOaSFjHOM+ew qHkZ98XnsYDUHHD9FUJ5zW18itKn9mw79h/O/D89ysKJDSMfjDPDpik0alG6wsOx5p15 0jzXEO+97jS16rbZ9UsKbVOPt2lLsWR5/0+ng1wOkihsDDShL+xgd98/I6UMtIfDDvD+ 7OyM0tr+kXMMYnRDJiCP0IhgR2CzT3bPxF+P+jHs7B0cp4owtwcAJ7PsAfTqzNOGmBgD 69y2LYP5TvqGNGt6WQa1EMpqMyK5nL08BdwkvoBjUZW5Law0+Z3rWswO+KVN1XWojX3I puJA== 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=kNaGe+gRNNJN9311HSyBaLL5guDPg3kkZIdTXpU39W8=; b=uL6V5AG6/sO3Jhd6urhTORP9IERGreeYaPAc29zjUVykZ3SVEPOWC45zZ0IilGjN+w YDH6DFzLMFLU2IwkHBjJkopY8WLvEkr+w4xePQKDDj89AhusqK7qitkWM0eTS77DmPC6 0/OtXx2LGPlBqMUiQmBRGd8qDsnb056iss537V+0giq9LqX3wJiziFq7W+C6AQPADdxo koDhKNVSjOicVGz9tzu4dCtVuagbhuLIHJLK8ZgnlpEM5KjWTZIXEFMpymeRCw50EA7n xaflmpWcz7waxEvqn1iSSa2u4axgXPzfh2MsvwVKCZnaEp1ZpOKeKnRsP4KKq2noHAV6 pNoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wjF4cyrL; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l15-20020a170906794f00b0078333d9f17bsi15297945ejo.819.2022.10.19.02.17.51; Wed, 19 Oct 2022 02:18:15 -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=wjF4cyrL; 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 S233030AbiJSJRL (ORCPT + 99 others); Wed, 19 Oct 2022 05:17:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233222AbiJSJOO (ORCPT ); Wed, 19 Oct 2022 05:14:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C192E0A6; Wed, 19 Oct 2022 02:04:30 -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 C8B4F61750; Wed, 19 Oct 2022 09:03:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDD0AC433C1; Wed, 19 Oct 2022 09:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170233; bh=uVPtii6QQOmB4B6xF72ZYD0gNI18FJWJaZLcL+ZjKkI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wjF4cyrLSozly00eR663QyIoWB3Iz4vXXPqT3rQZbHOfRmNHaQLv6BFMv4+mYHgVX 8LtZAmkUL4KqivCHJGcwpwcYGUd8pUrf3a1MUItGZbPRgKe/J2l5mxh0jSFfeF8rLC 00eItiMW2sZoiuwmfNvVc6n57m78IGQppf2VIVr8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dongliang Mu , Neil Armstrong , Vinod Koul , Sasha Levin Subject: [PATCH 6.0 560/862] phy: qualcomm: call clk_disable_unprepare in the error handling Date: Wed, 19 Oct 2022 10:30:47 +0200 Message-Id: <20221019083314.730032616@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747107022983745044?= X-GMAIL-MSGID: =?utf-8?q?1747107022983745044?= From: Dongliang Mu [ Upstream commit c3966ced8eb8dc53b6c8d7f97d32cc8a2107d83e ] Smatch reports the following error: drivers/phy/qualcomm/phy-qcom-usb-hsic.c:82 qcom_usb_hsic_phy_power_on() warn: 'uphy->cal_clk' from clk_prepare_enable() not released on lines: 58. drivers/phy/qualcomm/phy-qcom-usb-hsic.c:82 qcom_usb_hsic_phy_power_on() warn: 'uphy->cal_sleep_clk' from clk_prepare_enable() not released on lines: 58. drivers/phy/qualcomm/phy-qcom-usb-hsic.c:82 qcom_usb_hsic_phy_power_on() warn: 'uphy->phy_clk' from clk_prepare_enable() not released on lines: 58. Fix this by calling proper clk_disable_unprepare calls. Fixes: 0b56e9a7e835 ("phy: Group vendor specific phy drivers") Signed-off-by: Dongliang Mu Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20220914051334.69282-1-dzm91@hust.edu.cn Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/phy/qualcomm/phy-qcom-usb-hsic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-usb-hsic.c b/drivers/phy/qualcomm/phy-qcom-usb-hsic.c index 716a77748ed8..20f6dd37c7c1 100644 --- a/drivers/phy/qualcomm/phy-qcom-usb-hsic.c +++ b/drivers/phy/qualcomm/phy-qcom-usb-hsic.c @@ -54,8 +54,10 @@ static int qcom_usb_hsic_phy_power_on(struct phy *phy) /* Configure pins for HSIC functionality */ pins_default = pinctrl_lookup_state(uphy->pctl, PINCTRL_STATE_DEFAULT); - if (IS_ERR(pins_default)) - return PTR_ERR(pins_default); + if (IS_ERR(pins_default)) { + ret = PTR_ERR(pins_default); + goto err_ulpi; + } ret = pinctrl_select_state(uphy->pctl, pins_default); if (ret)