[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ec14762f-29fd-39ba-8314-cfd4ec7a0001@ti.com>
Date: Tue, 29 Sep 2020 09:56:18 +0300
From: Tomi Valkeinen <tomi.valkeinen@...com>
To: Tobias Jordan <kernel@...e.de>, <linux-leds@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>,
Marek BehĂșn <kabel@...nel.org>,
Markus Elfring <Markus.Elfring@....de>
Subject: Re: [PATCH v3] leds: tlc591xx: fix leak of device node iterator
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@...e.de>
> Reviewed-by: Marek BehĂșn <kabel@...nel.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@...com>
Tomi
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Powered by blists - more mailing lists