Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp886964pxx; Tue, 27 Oct 2020 03:04:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwl4u9qx/0Ydm+M2BZldIkOtsxCrQAxqf4b6u1MyMBlKIwOt/q92+uHuXvwRlox92Uunyac X-Received: by 2002:a17:906:b197:: with SMTP id w23mr1725980ejy.166.1603793091997; Tue, 27 Oct 2020 03:04:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603793091; cv=none; d=google.com; s=arc-20160816; b=CWEN+9cCzplTdktF8CkLJmcSh4nw7qb/LAJNWVBr+B8+EIsE/rXHT60Y+Cdd6yT+UH YWwgMe1HLCjDdQEPvRthUWtRDdUlDAAr6VQ0H7DVb7Y8C9MFv+xDk1TK7O0b5YVQ6NPb WLeQKwW9Fim+TksmDH7TQn2RBdL/mEO6NzyPHBd4+cHaz8nzx/7bfMP2T2WOaxu+BmBD fniN0m24GbLxx9/VAhqmhj8WK1hU+POfQs1CvHZVEZDL9PGRVQqC4eVT/QmqI+aT8s3h 6JLA4XK72ym4n4kOGQDXOTvrVmtqWb0pJ4OUiveuS1pte+CSzk4cPc18aNkbtcCVwuSj yVwg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dNuhp6ulRFZx6nNyNfwHffG4cj296KoPXoRgdoxCNH8=; b=lPYRt8ijGh4WojI8HMMEfqNlhTQkRTsE9UXt3K8/WQELMyBiS0YrHofZsOjlWQteGL os41rkDV7rrl2U2wiKUr/bxiI9ykAu5CpGYnuRQPdEeFWZZuKayAbEr05SCuAp3pPr+E UXBKR9V3bFD37x3CSTyOIg1OHw18FwYshlWbVyvYfab0apVtux7n1qp8+ByeIYBPuBun HqGBjsV+vhveTcJwuscWybCZwdcC413MYmoUyT6U8ziY50U5LesCfUAkmKSPJiYCbWQM r+paCAG9ExmOuwMrQ7Uz0gH7rxrs01SU1pZp04JxVcbghO3wcRdybJ6k54/Xt1nnIhXZ 01Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZDvBsAlf; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ym1si595231ejb.689.2020.10.27.03.04.29; Tue, 27 Oct 2020 03:04:51 -0700 (PDT) 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=ZDvBsAlf; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437315AbgJ0ABT (ORCPT + 99 others); Mon, 26 Oct 2020 20:01:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:36320 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2411148AbgJZX43 (ORCPT ); Mon, 26 Oct 2020 19:56:29 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D29F820770; Mon, 26 Oct 2020 23:56:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603756588; bh=PYSup8cJDclLG37QWwdOKGOB4WRiilxqiT29AB8MppQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZDvBsAlfU1tmDtgGXAA3Eju5Oe32xLJv1b97EcoM65oGKyLjm8n/7dk5Ac4kY/ObU +KLrOXbGT8zdacB9/t8Ev1cpFHBvEnjqTMbkE193rEn8sI2rdUOYvnsBHG8izWZsS/ MYE1h0jtfXolSFc8SatpbY5dZgt+UTYJD4eagFdI= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tero Kristo , Dan Murphy , Stephen Boyd , Sasha Levin , linux-omap@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 60/80] clk: ti: clockdomain: fix static checker warning Date: Mon, 26 Oct 2020 19:54:56 -0400 Message-Id: <20201026235516.1025100-60-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026235516.1025100-1-sashal@kernel.org> References: <20201026235516.1025100-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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.25.1