From patchwork Sat Oct 22 07:25:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7656 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1107984wrr; Sat, 22 Oct 2022 01:42:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Fe9NgiA+ugZA30KcXg20nzXk1erkDHy1zigC6ABzkf9zJpxm/b3B+PiY4SbTEM7s8RAfh X-Received: by 2002:a05:6402:249f:b0:453:eb1b:1f8b with SMTP id q31-20020a056402249f00b00453eb1b1f8bmr20751294eda.235.1666428169491; Sat, 22 Oct 2022 01:42:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666428169; cv=none; d=google.com; s=arc-20160816; b=U27ZKmfWqkZHFO0ok3YZUT05K8YlhlaauAvuonols+8E+tJ3xqrLE53XGUa6ChPJMo 7D6Ii/uYmZ+sG+ZoLPbnDR6LhTOSGCGrUa1oQS3QlZEKnAZk+L8k09TbVVa0mvIgPUKX Qjm97FdXLg+505icog1ZHTX16F9HBwNhwFJhLCLJs3LpGcvRQrCXU8p2ZR/EGUqhQMV+ lOaz6ttRxpGu8/zxiDJVeewiz5u0pvMbk/rjH/Wi8AU8Hmu644AKOrrOG5GJ4Ht38DaB Ur4h0e/T/A2qleVyMGVZSzbwncndk24PHC8AIlbuoIqTk9sNrjp0TI1cUk7KXMdSUiPo TZNw== 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=pVJ95AfaYB+OTQBUCjCdJX1Eh0kdjQdOlxAwTx1++cSlFdvQKMcspYFO4ec7tgqkdO LAyq68VJajs0h2yNM5QrEcKDClVMoKEFP4VcM9UmOpJuLWf+X5X09XiMXL0VIeyALf70 TFJYHiw0rvLUyHuuZzkc3Es9pK7vip27JD5RYJoP7KT4f03yH0v2ngijxah2je9cVzde Q9LF1ABxVyMcA+raF3ygTSU9/U8f48hivo66KtAy9MfXtP1ttFt23Mtao+DMxuEvKOUK zh6F+RL9IVJDZFdu7oFDkDANGkwhnxIZ5w4sxRbnbZwYmSdFs3BzLBWOMqJg5tge2BJ+ Rlag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gP2XaaPE; 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 o25-20020a170906289900b0078d4dcceb5dsi19050294ejd.717.2022.10.22.01.42.25; Sat, 22 Oct 2022 01:42:49 -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=gP2XaaPE; 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 S234020AbiJVIiA (ORCPT + 99 others); Sat, 22 Oct 2022 04:38:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233979AbiJVIcK (ORCPT ); Sat, 22 Oct 2022 04:32:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ABB72E533E; Sat, 22 Oct 2022 01:03:13 -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 E115C60B39; Sat, 22 Oct 2022 07:54:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2426C433C1; Sat, 22 Oct 2022 07:54:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425283; bh=uVPtii6QQOmB4B6xF72ZYD0gNI18FJWJaZLcL+ZjKkI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gP2XaaPE2t3t62LrYIKhH2Pdwtn8I1zvnRcFxppe0+7F92te8aOWE0XRmTR/vH2wM 6zr6wC04oBpL2oR0QvkF64OfCXDtGLTBezz/RPl7KmXy1ovPH6yB0lHEt6KPDFqChC stkcnxcWqxYdtmMxK+qARE0muZWZyS3TEsUAtir8= 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.19 450/717] phy: qualcomm: call clk_disable_unprepare in the error handling Date: Sat, 22 Oct 2022 09:25:29 +0200 Message-Id: <20221022072518.166320864@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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?1747376584345103347?= X-GMAIL-MSGID: =?utf-8?q?1747376584345103347?= 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)