Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp825059pxb; Tue, 3 Nov 2020 13:36:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9oLsCVqns00cO5zqy52DFf+mSXYqRIidUPTGCTamxy5v2NXbI0QgIgNyt6jKAyU37UE4m X-Received: by 2002:a17:906:65b:: with SMTP id t27mr21683398ejb.74.1604439393229; Tue, 03 Nov 2020 13:36:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604439393; cv=none; d=google.com; s=arc-20160816; b=Nkqx+5AsCnnZPdVfdj6N3KnZ9/IWZyZvaMcymWjzDrSEYQAQW8cPKsXOldmVcumSAc LTH/2fFRWiCzEn2pS1O6AYbamhmfpnZl4rp71MuXeCu87Tl7anVFZlvlVKGMWAsJFq3n 3bp8S/aYDDFuoXTkxXe6H6IooStf7uMM4o6hNjU5g5benbXpErZW3STKeu36eqBeosQ0 ymmcvYUmvRCgh1ZGQTQjczreI7DOfhFgerz48tZqInGxNyoBkM4FnWK2QmuqTn9IQxPo yw/uqTwC/q2vzJHXvk2o6LpVep0P3h11P/QVWKekWU7Cg95Z2BNZSYbH5qKvj32U6ADj a/cQ== 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=cMMwOeyuCq9kO1RU8gT7yZY8l1GzQ6GiFVtxiT1dD2U=; b=gc38E95ZrRDlBGR2vOD5bQwcLu7ww18v8HwSMPgyYfpTbVoLSmHxCCquR31S2SJOcy SwuO6rYrwTLaknCVlx7VN6OOnCH4WI9ilYEp0Sa9r9KISd4HI22H125mE8XX0GYZgell jvVd/B2AlFTQrJw1/hZGkzRD0+aRfA3/ZV2L+PFXWCSWwb9eO6b1NrFk61y2wfDqjOAe DSz4M0mu2cSgtz8jznEBnRgEkK9mLjk5oqA9mFo2tbSOxB5vjrTZiGxcl1jiBo8EKUFq 60DOixUetiBWZUOwMFoLFi6v38DiLjhLgWo3Miixy9zhWn61iPBlpiOO0OXABp/pcFjL /Tbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cZvk+GR2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n7si70421ejr.387.2020.11.03.13.36.09; Tue, 03 Nov 2020 13:36:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cZvk+GR2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732176AbgKCVc2 (ORCPT + 99 others); Tue, 3 Nov 2020 16:32:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:59290 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731977AbgKCU5I (ORCPT ); Tue, 3 Nov 2020 15:57:08 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 50D3522226; Tue, 3 Nov 2020 20:57:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437027; bh=O6U5wOOCN4ndNI4ZX6LMq38cihhcCpjkZYVwm+JUdRA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cZvk+GR2Fj/nwU4bcDfKjKMQB/MJttzacjkn0kB1pTUSh+ArOajH2/VZdEybiwa7X WvGd1Q3lJKos3jYNJpYoJSCngI/2RbDhyahfm3HHzSMaPMl/Yifz6gBz1F/4Liwz/N wI4pxwPGNeigK2iYKrO7eHNn74N3DybY2Jvlhizw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Murphy , Tero Kristo , Stephen Boyd , Sasha Levin Subject: [PATCH 5.4 077/214] clk: ti: clockdomain: fix static checker warning Date: Tue, 3 Nov 2020 21:35:25 +0100 Message-Id: <20201103203257.589717041@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203249.448706377@linuxfoundation.org> References: <20201103203249.448706377@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tero Kristo [ Upstream commit b7a7943fe291b983b104bcbd2f16e8e896f56590 ] Fix a memory leak induced by not calling clk_put after doing of_clk_get. Reported-by: Dan Murphy Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20200907082600.454-3-t-kristo@ti.com Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/ti/clockdomain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clk/ti/clockdomain.c b/drivers/clk/ti/clockdomain.c index 423a99b9f10c7..8d0dea188a284 100644 --- a/drivers/clk/ti/clockdomain.c +++ b/drivers/clk/ti/clockdomain.c @@ -146,10 +146,12 @@ static void __init of_ti_clockdomain_setup(struct device_node *node) if (!omap2_clk_is_hw_omap(clk_hw)) { pr_warn("can't setup clkdm for basic clk %s\n", __clk_get_name(clk)); + clk_put(clk); continue; } to_clk_hw_omap(clk_hw)->clkdm_name = clkdm_name; omap2_init_clk_clkdm(clk_hw); + clk_put(clk); } } -- 2.27.0