All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Nishka Dasgupta <nishkadg.linux@gmail.com>
Cc: jacek.anaszewski@gmail.com, dmurphy@ti.com, linux-leds@vger.kernel.org
Subject: Re: [PATCH] leds: netxbig: Add of_node_put() in netxbig_leds_get_of_pdata()
Date: Mon, 29 Jul 2019 13:32:22 +0200	[thread overview]
Message-ID: <20190729113222.GC396@amd> (raw)
In-Reply-To: <20190729065356.26793-1-nishkadg.linux@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 797 bytes --]

On Mon 2019-07-29 12:23:56, Nishka Dasgupta wrote:
> The variable gpio_ext_np in the function netxbig_leds_get_of_pdata takes
> the value returned by of_parse_phandle; hence, it must be put in order
> to prevent a memory leak. Add an of_node_put for gpio_ext_np before a
> return statement, and move a pre-existing of_node_put statement to right
> after the last usage of this variable.
> Issue found with Coccinelle.
> 
> Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>

Acked-by: Pavel Machek <pavel@ucw.cz>

Note that I don't want to see this in stable: leak is tiny and is only
in unlikely error paths.

Thanks,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2019-07-29 11:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29  6:53 [PATCH] leds: netxbig: Add of_node_put() in netxbig_leds_get_of_pdata() Nishka Dasgupta
2019-07-29 11:32 ` Pavel Machek [this message]
2019-07-29 19:20 ` Jacek Anaszewski
2019-07-29 19:20 ` Jacek Anaszewski

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=20190729113222.GC396@amd \
    --to=pavel@ucw.cz \
    --cc=dmurphy@ti.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-leds@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.