Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2173862iof; Tue, 7 Jun 2022 22:10:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztYQ4l2oUAlioTa9MVn9x5EKzHAVARMmrxiXXLQjdHYNSuxUSbw60Z8+ZGGR0kgaC5c7iO X-Received: by 2002:a17:903:40c9:b0:167:5fce:a5e with SMTP id t9-20020a17090340c900b001675fce0a5emr21521157pld.6.1654665026230; Tue, 07 Jun 2022 22:10:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654665026; cv=none; d=google.com; s=arc-20160816; b=jQu8XIFAnvvMSHrJa2fB/JxTJAzKCRRGRWBn7C74N1ltWetSJ3bnx2yJfYK8yplomp LAdS6nkrV99ArET/3XwOavnqtP69QHkghQ5Myde510TFSmvdB6ftgj+YOePFVgPBCaf7 B162s3uAfJok0uv6eVYJjf+Nqt9UjIqmsmlDE7dIy3ryXn6OapjwYKeKAhI1eoiMunQW c9pDqClIul+kQ2V4I6A5QYR7qAPsEImzk3osymP+nIU+8sbFsZYz5Za5VKWcHTcG6PBu F7s7IsBol188C3wnpEzDXtEbQGmMzUbdsxabAAlpbBS+pFsNUiax/d0gHCeB+PH59dRu LMlQ== 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=zzhkWEiX1gbZuXklzPVX4anhq8cdGa6gQzYF7r4liyA=; b=eLJRFrASEeDgjGyYJ6BlTrmP8W4uSIKncFDvnP58INDZBs6Sg0gFNcH3tPofkgAvlG bMEe91fVbjfpcVymg8XObvqO+GmjEQ+0YzxupWC6VEq3vnD68PLLsSeab/sfzTNE7GFz SjPAWtZalpjo/Sn/zIF5bl7I+V/9335uLe2g0YIFVkVKpFaAoB0aPlPCO2cxaLOiR2a6 9MVj7O7FPR3Jc6FvXWzBvbU2Or76js+0g5E7WEElAsM6Oq8lsMLpeFIj11Zp19Pqgs1Z xCYeZ+vayam5HDPTxeVvTRyVZZsoSFP+cRjdDKGIvM3Pfqdm/dIo1wOeRru3pzniPmla n+YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OMW2NVh+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i7-20020a170902c94700b001636dafb8e4si17839506pla.217.2022.06.07.22.10.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:10:26 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OMW2NVh+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CAE8D3FDA5; Tue, 7 Jun 2022 21:41:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350697AbiFGSLb (ORCPT + 99 others); Tue, 7 Jun 2022 14:11:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349964AbiFGRvn (ORCPT ); Tue, 7 Jun 2022 13:51:43 -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 8E5D313F90B; Tue, 7 Jun 2022 10:39:16 -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 1F96CB82285; Tue, 7 Jun 2022 17:39:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CEE5C3411F; Tue, 7 Jun 2022 17:39:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654623554; bh=fRQWZT0Xm+rDRVnJ/6JD4s0wA3bWamWn7hf2LVbjGcY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OMW2NVh+XCcUIPDpNgVpN+YZFQpZ6UiDEfqN0p/WbiRvDijmnG/jMoqNGLYnzQJjU lccAiyH9e7h8FnPURfpIz1sLMmejefY0ChpwNQygP+aDM6P+4hAmAF3xrRltm7MfNp te10KcquPM+UDHeWerOSJ5ZyeVHFwwLXuFeqH8tY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vivek Gautam , Bjorn Andersson , Johan Hovold , Vinod Koul Subject: [PATCH 5.10 418/452] phy: qcom-qmp: fix struct clk leak on probe errors Date: Tue, 7 Jun 2022 19:04:35 +0200 Message-Id: <20220607164921.011306528@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Johan Hovold commit f0a4bc38a12f5a0cc5ad68670d9480e91e6a94df upstream. Make sure to release the pipe clock reference in case of a late probe error (e.g. probe deferral). Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Cc: stable@vger.kernel.org # 4.12 Cc: Vivek Gautam Reviewed-by: Bjorn Andersson Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220427063243.32576-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- drivers/phy/qualcomm/phy-qcom-qmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/phy/qualcomm/phy-qcom-qmp.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c @@ -3789,7 +3789,7 @@ int qcom_qmp_phy_create(struct device *d * all phys that don't need this. */ snprintf(prop_name, sizeof(prop_name), "pipe%d", id); - qphy->pipe_clk = of_clk_get_by_name(np, prop_name); + qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name); if (IS_ERR(qphy->pipe_clk)) { if (cfg->type == PHY_TYPE_PCIE || cfg->type == PHY_TYPE_USB3) {