mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Behun <marek.behun@nic.cz>
To: Tobias Jordan <kernel@cdqe.de>
Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	Pavel Machek <pavel@ucw.cz>, Dan Murphy <dmurphy@ti.com>,
	Jean-Jacques Hiblot <jjhiblot@ti.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>
Subject: Re: [PATCH] leds: tlc591xx: fix leak of device node iterator
Date: Sat, 26 Sep 2020 01:17:55 +0200	[thread overview]
Message-ID: <20200926011755.01c5c645@nic.cz> (raw)
In-Reply-To: <20200925231011.GA2450@agrajag.zerfleddert.de>

On Sat, 26 Sep 2020 01:10:11 +0200
Tobias Jordan <kernel@cdqe.de> 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>
> ---
>  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);

This won't apply on pavel's for-next tree, there is no check for
EPROBE_DEFER, see
https://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git/tree/drivers/leds/leds-tlc591xx.c?h=for-next

      reply	other threads:[~2020-09-25 23:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25 23:10 Tobias Jordan
2020-09-25 23:17 ` Marek Behun [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=20200926011755.01c5c645@nic.cz \
    --to=marek.behun@nic.cz \
    --cc=dmurphy@ti.com \
    --cc=jjhiblot@ti.com \
    --cc=kernel@cdqe.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=tomi.valkeinen@ti.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

all inboxes | Powered by JetHome®