Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3186424pxb; Mon, 9 Nov 2020 05:08:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyN0W1ntz2E8nAtn4V6Ci5A/Ii34GhBtCY2IQIAdyVLRUSXUcTZ3H6mZq6vpvNcHWDxDmBO X-Received: by 2002:aa7:cac2:: with SMTP id l2mr15332165edt.141.1604927280884; Mon, 09 Nov 2020 05:08:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604927280; cv=none; d=google.com; s=arc-20160816; b=lgRtKy7Yl6fmxowV3A5D8zDTZ//VwPla2RYlrWsPMW7xmNC5TkEM70EILo71hArItq lfpCXPlEjndMtirzc5rzMy33727nj/vVD6/R3WSJ7XIYX85jv9cFaqqW2OuQsliJciE7 4q/D9LlJm2qkBVu1erht7w0po8+LHm/E8V9rnfODDOXpW1l5ML3SUFjOV1j1eMEr730Y qOiiG+exL0qQ6SUNdNyRDmZr5Hm2e9qUbXOiu+ETkg6FA1Z13U5mNwzpT/rdUVZqN5RM QObO+F2yPTFr9FMd0/arhqUYX8F0Wy5Kx6k7Yyr92QYf2DVvrzknalVR+kBcv+ggwvaY 9Mow== 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=zrBpEZqZXEU3QVGvpk8Y5ZF3xP3XOzY8fPTZGB3c6s8=; b=twZsnPXVtlX7wq5ZKpQQBMdFvJIVOaHpxae/dtwF7CG0JiH69Xo3npSPNyxWOTXW3Y hrjIjfQuGBWvx8gskXGBmYaqFTKan9G8ZAfH3GR7tb4u5SaJLfDUkybV1DtPL8XxvCnH AetOUscbWZO7qTVRE+ZIrVkJ7QUaWjCr8ssDA7QAzkYfeYNsL09KkMnyPYaI2jzt0ooz KY7dHqCTHabCWjYeJ2acUU7kLF/++KTaNfl6J819/SZLxHBaCI56C4L8Yx61zHeZzk5B vK8+WRqrP3LBzT/By3CxW8QBw07Zqm+BRT5ZumSkBeHZfOqN0VXuyxL+CbyVlnNUWQsZ T+/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l6QdQOax; 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 r21si6408517ejs.293.2020.11.09.05.07.33; Mon, 09 Nov 2020 05:08:00 -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=l6QdQOax; 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 S1730072AbgKINCi (ORCPT + 99 others); Mon, 9 Nov 2020 08:02:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:55406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730554AbgKINBX (ORCPT ); Mon, 9 Nov 2020 08:01:23 -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 89A3020663; Mon, 9 Nov 2020 13:01:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604926883; bh=wtIKMb8hzBhIcqLet9epST3Zgg6KzPMFtnpUsx8VsQs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l6QdQOax5usgmLLzc/sRE9SlLPcOV2FKt7kUEu9CZtoyvJ5i9JQlT2nxjXC3Ff0we +u0bjjzISTtIIM6e19tXLbjnxN7100Sea9bGC/RDYtbCP7YPb5+lcVufTpQEE5eXPK ZqdfxoCrmdbTUuLLS0TN9EWZtkzVFJqLevZqB/I4= 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 4.9 036/117] clk: ti: clockdomain: fix static checker warning Date: Mon, 9 Nov 2020 13:54:22 +0100 Message-Id: <20201109125027.367260601@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109125025.630721781@linuxfoundation.org> References: <20201109125025.630721781@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 6cf9dd189a924..4e5e952380869 100644 --- a/drivers/clk/ti/clockdomain.c +++ b/drivers/clk/ti/clockdomain.c @@ -124,10 +124,12 @@ static void __init of_ti_clockdomain_setup(struct device_node *node) if (clk_hw_get_flags(clk_hw) & CLK_IS_BASIC) { 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