linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / 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	[thread overview]
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	other threads:[~2019-08-16  7:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15  6:13 [PATCH] soc: renesas: rcar-sysc: Add goto to of_node_put() before return Nishka Dasgupta
2019-08-16  7:26 ` Geert Uytterhoeven [this message]

Reply instructions:

You may reply publicly 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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).