[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <89af2621-7688-49ba-8246-22d79a2b8b20@web.de>
Date: Wed, 29 Oct 2025 14:34:15 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: vulab@...as.ac.cn, linux-gpio@...r.kernel.org,
linux-sound@...r.kernel.org, patches@...nsource.cirrus.com,
Charles Keepax <ckeepax@...nsource.cirrus.com>,
David Rhodes <david.rhodes@...rus.com>,
Linus Walleij <linus.walleij@...aro.org>,
Richard Fitzgerald <rf@...nsource.cirrus.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] pinctrl: cirrus: Fix fwnode leak in
cs42l43_pin_probe()
…
> +++ b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c
…
> @@ -563,10 +568,20 @@ static int cs42l43_pin_probe(struct platform_device *pdev)
> priv->gpio_chip.ngpio = CS42L43_NUM_GPIOS;
>
> if (is_of_node(fwnode)) {
…
> + child = fwnode_get_named_child_node(fwnode, "pinctrl");
> + if (child) {
> + ret = devm_add_action_or_reset(&pdev->dev,
> + cs42l43_fwnode_put, child);
> + if (ret) {
> + fwnode_handle_put(child);
> + return ret;
> + }
…
I doubt that such a function call is needed in this if branch.
https://elixir.bootlin.com/linux/v6.18-rc3/source/include/linux/device/devres.h#L152-L168
Regards,
Markus
Powered by blists - more mailing lists