From patchwork Mon Oct 24 11:31:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10014 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp619097wru; Mon, 24 Oct 2022 12:35:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7v1DBGs8yHwjN83mJpIfEET9KLC2HSXwiNqvTnxgKifj25vxY7pO+FM22/OOUU4e6ahOVN X-Received: by 2002:a17:903:244d:b0:183:afb6:e7ea with SMTP id l13-20020a170903244d00b00183afb6e7eamr35161704pls.31.1666640140607; Mon, 24 Oct 2022 12:35:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666640140; cv=none; d=google.com; s=arc-20160816; b=Enj9zSW1/KrVqmxMwnB6lgu3F6qmfy2bv1vwN7coh3oGrnBStlQK3Ms4OSHqML87Io kASE+It8DbE5oRolE1JkOemzLcoXcJyouYkNbjnY1uvrOlEvyxIF+gRchZvWP51qjxb7 G0dWOWK/QtBAnn790d8aSauuMkphW+y87v4iqA4lBKXXwMK/cMoRADeBVXDpgQJst4lT 3F54YOgWGMxVG0h/sOFlazGdNnmfUYiRICoi06O7mB8utvv9NtDFsHW3ZjUDWEtwfub1 DWELMVFVtzuoMm8pR+x3922Nxkvog5UeLbctVygAjIFCQFT+MGWqM6EY8iCbQ9Ks/Ysq xdLA== 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=MvQMNPB/x06gx1XNgIYwVMm6p3KANeKUnfYFy3I+4DzKeA6iN4FBV9E3/jaWAPxKqE Jsvl52s+aZwk97oGyKuAyWKa0PYEZnXeuBY+CeINQpEiIkcvYv0mYgTeum9KZIdZSI1j LeVB8I0yF6ekcMueXhpO7c1Zg6eAeTzewrq2lkDdooKK4BFrU5ukNd7HpzD+6ROlf5MO 5wtyKvMuEYsxcYhBGn/bPw88c9B4fue49EGX217Jg14pbAib9TnWf0btZi4p0KSc0eaz OmMUr4tmifrLlz44ffww3GQ6ln8mUYulFcQNSGgzOWFly2acGmcrkPbINg5yxJ6Rwol5 iJ+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aa+AskcP; 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 r20-20020a170902c7d400b0018693297257si256437pla.624.2022.10.24.12.35.27; Mon, 24 Oct 2022 12:35:40 -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=aa+AskcP; 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 S233197AbiJXTfE (ORCPT + 99 others); Mon, 24 Oct 2022 15:35:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233507AbiJXTeS (ORCPT ); Mon, 24 Oct 2022 15:34:18 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9151089834; Mon, 24 Oct 2022 11:04:57 -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 6DF53B811D5; Mon, 24 Oct 2022 12:00:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C78BDC43141; Mon, 24 Oct 2022 12:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612854; bh=se1kNYoyh1c3+l4JRa6OE9QKY6HWsSzNgEKBIgh4c+U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aa+AskcPi/EVwCI2p6wmB10hxFPCPvuQswVMapXGxGlxoKGBECkDlnK5KRP9zwcYD tNpJ8hUM3RUarXC1NCJp7mKw97gt22j/L5jRT9LkCydyftGLA1uKzdh/5m4eJwFjfa 9XG4OFn/zMAPIxXgJpR4pWyI6SWPHhiW+6xU7c00= 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.19 144/229] phy: qualcomm: call clk_disable_unprepare in the error handling Date: Mon, 24 Oct 2022 13:31:03 +0200 Message-Id: <20221024113003.671920692@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112959.085534368@linuxfoundation.org> References: <20221024112959.085534368@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?1747598851872246861?= X-GMAIL-MSGID: =?utf-8?q?1747598851872246861?= 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)