Linux-Renesas-SoC Archive on lore.kernel.org
 help / color / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Nishka Dasgupta <nishkadg.linux@gmail.com>
Cc: Simon Horman <horms@verge.net.au>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Magnus Damm <magnus.damm@gmail.com>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH] soc: renesas: rcar-sysc: Add goto to of_node_put() before return
Date: Fri, 16 Aug 2019 09:26:55 +0200
Message-ID: <CAMuHMdXJVit0F+KO7DL2t5ZJ14MYb7R_yi=OUuQ_9Z6cLgA=SQ@mail.gmail.com> (raw)
In-Reply-To: <20190815061355.4415-1-nishkadg.linux@gmail.com>

Thanks, applied and queued for v5.4.On Thu, Aug 15, 2019 at 8:14 AM
Nishka Dasgupta <nishkadg.linux@gmail.com> wrote:
> The local variable np in function rcar_sysc_pd_init takes the return
> value of of_find_matching_node_and_match, which gets a node but does not
> put it. If np is not put before the function returns, it may cause a
> memory leak. Hence, remove the return statement that does not
> immediately follow a putting of np. Replace it with a goto pointing to a
> pre-existing label that first puts np and then returns the required
> value.
> Issue found with Coccinelle.
>
> Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>

Fixes: afa6f53df6052968 ("soc: renesas: rcar-sysc: Add support for
fixing up power area tables")
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v5.4.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15  6:13 Nishka Dasgupta
2019-08-16  7:26 ` Geert Uytterhoeven [this message]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMuHMdXJVit0F+KO7DL2t5ZJ14MYb7R_yi=OUuQ_9Z6cLgA=SQ@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=geert+renesas@glider.be \
    --cc=horms@verge.net.au \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=nishkadg.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Renesas-SoC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-renesas-soc/0 linux-renesas-soc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-renesas-soc linux-renesas-soc/ https://lore.kernel.org/linux-renesas-soc \
		linux-renesas-soc@vger.kernel.org linux-renesas-soc@archiver.kernel.org
	public-inbox-index linux-renesas-soc


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-renesas-soc


AGPL code for this site: git clone https://public-inbox.org/ public-inbox