Re: [PATCH v2] pinctrl: cirrus: Fix fwnode leak in cs42l43_pin_probe()
From: Markus Elfring
Date: Wed Oct 29 2025 - 09:34:25 EST
…
> +++ 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