Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp890505pxk; Thu, 10 Sep 2020 00:58:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxp1+JkP29lBVZvtQIZqFvGeeLVolXikc09MLCSI07KzJbPcP233bypeW1pxg9kBFch0flg X-Received: by 2002:a17:906:6409:: with SMTP id d9mr7402071ejm.344.1599724733908; Thu, 10 Sep 2020 00:58:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599724733; cv=none; d=google.com; s=arc-20160816; b=hSAxYx5r91A5ZXkk75q2eO52TrRCkQPTSSW1CfLezyj2ahajEaR7rwYu6zO6mr7S9O f46DK4LmJ2ZYTZj5Bqztv8NK0ZnZWbI7AsvCpNkUC6vxvVsc3pDI1X1cwHLuNUC49SSQ Gg+SrIr166EjuZV86r3yooDR4/DbyyOVKPKNsBHnLkh6uSngyotTnEyCfh98V5Y3XDP7 8f4kVCu2DQyVGvH7CJOHJEk04VWnCUrYY1nY99cS62cjkrXeX+p6nPEifbf/BJhqq0PY OdBxcx12aldWzZ3eV47luaqbue+wgWTHOf07MEJ0VvrJe3LuFJhylnrh/TXPSzdWQwYu tVrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:date:to:cc:from :subject:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=4pKISiYZhY3EeSnAyleLcIQNYM/Dt5k93S8IrckrwTs=; b=nMThlPnNF4tX5exMdxJlX3x/zGzZQJKj3KnOz1mMeAxh3aEu5SvwUOWFOSszg68eBO yROFFKxa5JSixoIGpJ+l/vAywcIAXWK0S/dgxt15GVIg2rTMorApd9K4D/Z5x8JYKAP8 khvjbCde3NbflGjO3cu7i++WkLjExdB8u2t7Xd2lU9U373Jhb5MYuViXB/GwswMMVj+A BkUnRf/w3gxR7Sd5EiRN+EjJ807pjHvMK8qF421ZQOtF372tc2uyDWapUiNpTT8qTHYL SKN4fvSY2raQZM8PD0Vtwc6kLQvZTTom4DKuYuF27/s/5acnUdcr/T8cM/9xuAoy2Jvd 1VAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=s78Httgm; 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 qx20si3014036ejb.469.2020.09.10.00.58.31; Thu, 10 Sep 2020 00:58:53 -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=s78Httgm; 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 S1728405AbgIJH5t (ORCPT + 99 others); Thu, 10 Sep 2020 03:57:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:36080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726816AbgIJH5r (ORCPT ); Thu, 10 Sep 2020 03:57:47 -0400 Received: from kernel.org (unknown [104.132.0.74]) (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 49E4020829; Thu, 10 Sep 2020 07:57:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599724667; bh=4pKISiYZhY3EeSnAyleLcIQNYM/Dt5k93S8IrckrwTs=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=s78HttgmbSoO2M+1IKqaQXEEF0Dz6GoeOC9ac+QJmYnlh01qs9LpethP8h7oZ9lko ++tmd3Dp5vC0lqd6buHZM2iRVZ9kroxrRpQkf8nhB0XsqmCfBaoSy/sDiITQ7JhLMt X5BpSQIUP0JerYjBPciWzDYf+gc4Za0gH0aFuqps= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20200829175704.GA10998@Kaladin> References: <20200829175704.GA10998@Kaladin> Subject: Re: [PATCH] clk: versatile: Add of_node_put() before return statement From: Stephen Boyd Cc: mturquette@baylibre.com, Julia.Lawall@lip6.fr, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org To: Sumera Priyadarsini , linus.walleij@linaro.org Date: Thu, 10 Sep 2020 00:57:45 -0700 Message-ID: <159972466586.2295844.9075545722301677556@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Sumera Priyadarsini (2020-08-29 10:57:04) > Every iteration of for_each_available_child_of_node() decrements > the reference count of the previous node, however when control is > transferred from the middle of the loop, as in the case of a return > or break or goto, there is no decrement thus ultimately resulting in > a memory leak. >=20 > Fix a potential memory leak in clk-impd1.c by inserting > of_node_put() before a return statement. >=20 > Issue found with Coccinelle. >=20 > Signed-off-by: Sumera Priyadarsini > --- Applied to clk-fixes