From patchwork Mon Oct 24 11:30:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9636 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp532471wru; Mon, 24 Oct 2022 09:08:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6SxGBQyZ2YVrLAa9GKFa94Z1bymPiARPiDCKmC31mbWCyanDi85IsWJC9Y26GrVtFIxGjF X-Received: by 2002:a05:6402:1f06:b0:457:149d:beaa with SMTP id b6-20020a0564021f0600b00457149dbeaamr31103888edb.238.1666627686837; Mon, 24 Oct 2022 09:08:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666627686; cv=none; d=google.com; s=arc-20160816; b=S1rI1qKPcXEQd9XgRNHX1Tu93QAX4jLrYoGX1nf3tD6v0gb/yBqXN608Ird5EDJ9Xm yxcorv33hAUAMZlKHhBltFUFrcFbhlwlkLBOSdDvm3T5XGSNRyv66NAWYVqy9UnTtQQ3 m2UeoJ4ovxv4L+WoHtneejN1axRBsDVb6cN5c5UGW56pkxMmlXxcCCljC/SndUeYe8T+ TeY8MMSHWXudJ8tKP77WlkwCshAxYHRgJm13FerHRYpJTKqx4B+RDbqgR9vw8C0YhZD0 K9skRj2tghYX0lvVzi0CxZs3K/6fDtSdvfUBSSzHntBqByFikvYM7IDE7I3afCBwjL3k uvJw== 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=b2LrdPslTpSR+a4NoDv8cr21N1Dh60AfYOqXbgR7nX8=; b=Ws8EqUKVMNWRdScvgiLIUQegfmMZDEs5fU+JW+ff1IaHQUFodhI0dCzNdxWLSRzdBj E4Sz02bgHoHEr1mzxPyFo57T3RR4Dg5p7mTow1qzA4pMJhellZedf6F7uaht4zqn61kB LI+0ivXEai1PbZKTLMn/0fEQ5v9zcFgxcHP20NIKfQH0xxHzJ4cijhp3hrEbYJvoRelT LxckOLRC9EuHCFRP+YqjeZfNEsJNZNH2fIPONYgzwUrTchth//ySZsDpPjRqQk8wgH4I EzOQyg5T+uX6Jr9OzJMHZpDQzLBmXln4x5Sjx+ozy7qYsjNMgpS1yWUcCSUHOo4rOnD3 AcvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AhhkDcS0; 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 w10-20020a170906b18a00b0078a76811e33si121467ejy.408.2022.10.24.09.07.41; Mon, 24 Oct 2022 09:08:06 -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=AhhkDcS0; 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 S233217AbiJXQHC (ORCPT + 99 others); Mon, 24 Oct 2022 12:07:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233007AbiJXQEJ (ORCPT ); Mon, 24 Oct 2022 12:04:09 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CB6E1E5764; Mon, 24 Oct 2022 07:56:21 -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 1A163B8114A; Mon, 24 Oct 2022 12:26:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B1BDC433C1; Mon, 24 Oct 2022 12:26:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614381; bh=npCRfkXpyD3oFS/RTYI4IZ26DGEUxTCME7Uv6lz4OjQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AhhkDcS0OGAsR+3db1qHYVsL9FsaGRBHe/bS3tCF82kQEuyOpqNPIlHp0hewRVcD3 amRQiO4JdiaTUXZGAo/b1tzkyJth/TfPNd8Q+ZaYWh3r8aPopkQ/XQXfAsfueMBuEW C65/bb3UhLT7x0dYbSOsSHldWCSRAmuacPVJytPQ= 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 5.10 239/390] phy: qualcomm: call clk_disable_unprepare in the error handling Date: Mon, 24 Oct 2022 13:30:36 +0200 Message-Id: <20221024113032.978853565@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@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?1747585792908672773?= X-GMAIL-MSGID: =?utf-8?q?1747585792908672773?= 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 04d18d52f700..d4741c2dbbb5 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)