]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
pinctrl: cirrus: cs42l43: Fix double-put in cs42l43_pin_probe()
authorFelix Gu <ustc.gu@gmail.com>
Mon, 23 Feb 2026 09:39:07 +0000 (17:39 +0800)
committerLinus Walleij <linusw@kernel.org>
Tue, 24 Feb 2026 09:51:30 +0000 (10:51 +0100)
devm_add_action_or_reset() already invokes the action on failure,
so the explicit put causes a double-put.

Fixes: 9b07cdf86a0b ("pinctrl: cirrus: Fix fwnode leak in cs42l43_pin_probe()")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
drivers/pinctrl/cirrus/pinctrl-cs42l43.c

index a8f82104a3842e3adda929b4c09cf20743a4ead4..227c37c360e19af43fca2b7dc65e3dd7b16cdc37 100644 (file)
@@ -574,10 +574,9 @@ static int cs42l43_pin_probe(struct platform_device *pdev)
                if (child) {
                        ret = devm_add_action_or_reset(&pdev->dev,
                                cs42l43_fwnode_put, child);
-                       if (ret) {
-                               fwnode_handle_put(child);
+                       if (ret)
                                return ret;
-                       }
+
                        if (!child->dev)
                                child->dev = priv->dev;
                        fwnode = child;