mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Tobias Jordan <kernel@cdqe.de>, <linux-leds@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: "Pavel Machek" <pavel@ucw.cz>, "Dan Murphy" <dmurphy@ti.com>,
	"Marek Behún" <kabel@kernel.org>,
	"Markus Elfring" <Markus.Elfring@web.de>
Subject: Re: [PATCH v3] leds: tlc591xx: fix leak of device node iterator
Date: Tue, 29 Sep 2020 09:56:18 +0300	[thread overview]
Message-ID: <ec14762f-29fd-39ba-8314-cfd4ec7a0001@ti.com> (raw)
In-Reply-To: <20200926162755.GA26532@agrajag.zerfleddert.de>

On 26/09/2020 19:27, Tobias Jordan wrote:
> In one of the error paths of the for_each_child_of_node loop in
> tlc591xx_probe, add missing call to of_node_put.
> 
> Fixes: 1ab4531ad132 ("leds: tlc591xx: simplify driver by using the managed led API")
> Signed-off-by: Tobias Jordan <kernel@cdqe.de>
> Reviewed-by: Marek Behún <kabel@kernel.org>
> 
> ---
> v3: removed linebreak from Fixes: tag in commit message
> v2: rebased to Pavel's for-next branch
> 
>  drivers/leds/leds-tlc591xx.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/leds/leds-tlc591xx.c b/drivers/leds/leds-tlc591xx.c
> index 0929f1275814..a8cc49752cd5 100644
> --- a/drivers/leds/leds-tlc591xx.c
> +++ b/drivers/leds/leds-tlc591xx.c
> @@ -214,6 +214,7 @@ tlc591xx_probe(struct i2c_client *client,
>  		err = devm_led_classdev_register_ext(dev, &led->ldev,
>  						     &init_data);
>  		if (err < 0) {
> +			of_node_put(child);
>  			if (err != -EPROBE_DEFER)
>  				dev_err(dev, "couldn't register LED %s\n",
>  					led->ldev.name);
> 

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

 Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

      reply	other threads:[~2020-09-29  6:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-26 16:27 Tobias Jordan
2020-09-29  6:56 ` Tomi Valkeinen [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=ec14762f-29fd-39ba-8314-cfd4ec7a0001@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=Markus.Elfring@web.de \
    --cc=dmurphy@ti.com \
    --cc=kabel@kernel.org \
    --cc=kernel@cdqe.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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

all inboxes | Powered by JetHome®