From patchwork Mon Oct 24 11:31:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10273 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp645018wru; Mon, 24 Oct 2022 13:46:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6S+DbZKGO6KA6jXoiB/pSCLTW8+Ri4AfviEAuBrvKF1RLF49S7+Z4eSYZqbpEBMdyIUD/K X-Received: by 2002:a17:90b:3510:b0:213:c0b:48d3 with SMTP id ls16-20020a17090b351000b002130c0b48d3mr8333410pjb.188.1666644416462; Mon, 24 Oct 2022 13:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666644416; cv=none; d=google.com; s=arc-20160816; b=gIZLW+1r+saMO6vNxT9Vu6ciYoGW02BdnGS5I4VlDrqpsyseia75Mwl5+nFRQmTP4H 9tqwgKNy37nbhve8aCNgOT9xw/qmTImgwkIv/FVLQhimZPffzFQpRZaahrGTFio7cMB+ KXmVA10vLayAjUiKxOvgTgYURacXUIULtsL12MvKHMK5LhGyfuImvXxK5qJUlV9z+Rsz Dpikd1uqaI8Kl1c/hZoQXHrRbBdEpu1iZLj+8jyB24q62mq7EgiTGRIRQ/TFEPbg/gnm Sn1lX14AZT1CFOfGnC9uTgaRoJvMzEAmAs6ywPALi4OTpK9VJPGtpUI7UGkaWP/Z8+yG jttg== 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=wkRsSHjj0i0bl5M1xYPhF2WFIXzB50WW2MjQ076fjLWeQw1rT+2HIuk0KbjAmzAC9q LbZ0HrW6csu52o67PiygdAq1m23GBWp7Pb/gryKrr0eElfAGSfvaGy6TlnSmTJ9YCYKu Gn4SlZX/vAv74A7upd1NNYLnJb6IHYT4q7VxfJwQ1lFh8if35tivvTXXhEKQIU9yg8jo lmJjJY5apZ1bRvO3fC0oKaAddk6v7iP4JCuR032Rg/VAb1gWRFInuTzwyPAvR9ehPRSa Xv8V20DBzmga/9yasVoUt5JAkOGoi/rpaz0H5bafcUbmFRFEAVuifc/rKvHTzA7kwj3S Ikag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rcx9iWtW; 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 o35-20020a17090a0a2600b00212ee661e5bsi943972pjo.153.2022.10.24.13.46.42; Mon, 24 Oct 2022 13:46: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=rcx9iWtW; 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 S235099AbiJXUp4 (ORCPT + 99 others); Mon, 24 Oct 2022 16:45:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235389AbiJXUom (ORCPT ); Mon, 24 Oct 2022 16:44:42 -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 15E6B6BD7B; Mon, 24 Oct 2022 11:52:28 -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 836C8B81979; Mon, 24 Oct 2022 12:48:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2681C433D7; Mon, 24 Oct 2022 12:48:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666615684; bh=npCRfkXpyD3oFS/RTYI4IZ26DGEUxTCME7Uv6lz4OjQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rcx9iWtWMDRm+Y2UEs0Ku60LD3YTFBwgdyXFd/phP6d5WDNxuBfCDTT5tkGUm5jJh EIt34oZOYWMXG9fk074EYDuY7KSz5zk6vI7emjn29QZuHdFr6GD9dhBqdDQgKFTajO v9qduGTqcOcCLscygksro3vqsDicE5uG7lJzYWZo= 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.15 327/530] phy: qualcomm: call clk_disable_unprepare in the error handling Date: Mon, 24 Oct 2022 13:31:11 +0200 Message-Id: <20221024113059.813985514@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113044.976326639@linuxfoundation.org> References: <20221024113044.976326639@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?1747603335285564236?= X-GMAIL-MSGID: =?utf-8?q?1747603335285564236?= 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)