From patchwork Mon Oct 24 11:30:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8901 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp433942wru; Mon, 24 Oct 2022 05:50:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4k2bs4vRJVyMjnYyez1Dgl1ANhV6dehH4iHEhbYAbakj8fkgJtv9jZuUwdqKnbEnjq59aC X-Received: by 2002:a05:6402:144a:b0:461:8e34:d07b with SMTP id d10-20020a056402144a00b004618e34d07bmr9607337edx.426.1666615856938; Mon, 24 Oct 2022 05:50:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666615856; cv=none; d=google.com; s=arc-20160816; b=Vl1n8IR2kAPiG8TW+2OhnxN1m6r/79z80Fz/GK3PGb25x1mwgwIQej7XwnGGj8ZMiQ a6hx5KpFFZL2y9QFywId4WFn8v4Uso1zViMM196Pko6mw8xjmKjXu72T4ycWcYjyPN1M tiwxh7FKoDl7VgbuThU6tVx5KYuzEK6daaDq5ASTSg+WA67aCpXrXgEwU2zRSNjz+lVg uMBPCdOGphDel0VluyXDjFtIYBSqzHBBFIBSh81peq+atNiutOje+FtI70YRxCHKLOHB 2qEenreunvpUGFG4hATRbwZJxIaD3zOqS5Gqs1Kpf4jCsNmKAc+4t3lKgX+FPHerk7bc 1thw== 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=nqQ4P/J9VtkX4z2cLrkC0D//fkBrc2+EHdZKZ8z03H4=; b=VCH042i4TC1PHQa7zp/HZxqS50ctavWVdpqGFIOCOu/RazDa//M+2fU9Zxm+R/CFtt dkkYJ3y5qsbjbFpA9flGVGzIYH7jk9hc8mMTTB//GKgWBDdsMncqNP/6rJGCfD8iVljP 3w2ZsKNb/sy+vftGjMdi/Vj9EI/BZK8qVFTAyseBfQjxhituTN3+NCk+L/vNujTbtONl ywezgrhJ1IdsjgeRADn1EJVcMfV0PNdj/2CFhWFgVTvnpLHU28AZGgmoHyLrLrlRSf7T 09+pOZLOZqq3XPK6aBugwPQTXcZD0wRy57rkAGtMmIOIFkHU1mAmBaDf9/80OitkMkdM j9sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=H2KODyvs; 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 z1-20020a056402274100b0045c786162f5si6153316edd.567.2022.10.24.05.50.29; Mon, 24 Oct 2022 05:50:56 -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=H2KODyvs; 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 S234458AbiJXMsw (ORCPT + 99 others); Mon, 24 Oct 2022 08:48:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234337AbiJXMoX (ORCPT ); Mon, 24 Oct 2022 08:44:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCE4C7CE00; Mon, 24 Oct 2022 05:09:12 -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 16A1A61290; Mon, 24 Oct 2022 11:52:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D123C433D7; Mon, 24 Oct 2022 11:52:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612360; bh=se1kNYoyh1c3+l4JRa6OE9QKY6HWsSzNgEKBIgh4c+U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H2KODyvsjmxhGUQOv7XeVbNfMt4FZyY4rQfbQjEiKeItJn8QOPCIx45N9d6pliRrN ahxiPB3Xb2UPqwaXpIumEeOH+2H5xv16kmHcIsw2paqH1IsKAAw1ak9UIub1VMzeB4 KsG9l8YbbW3tf4k0mw/A5OUiXTJ1ap/oeOLYwFLk= 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 4.14 138/210] phy: qualcomm: call clk_disable_unprepare in the error handling Date: Mon, 24 Oct 2022 13:30:55 +0200 Message-Id: <20221024113001.469398282@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112956.797777597@linuxfoundation.org> References: <20221024112956.797777597@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 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?1747573388706593207?= X-GMAIL-MSGID: =?utf-8?q?1747573388706593207?= 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 c110563a73cb..00926df4bc5b 100644 --- a/drivers/phy/qualcomm/phy-qcom-usb-hsic.c +++ b/drivers/phy/qualcomm/phy-qcom-usb-hsic.c @@ -57,8 +57,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)