Skip to content

Commit fd5bed7

Browse files
outman119linusw
authored andcommitted
pinctrl: cirrus: cs42l43: Fix double-put in cs42l43_pin_probe()
devm_add_action_or_reset() already invokes the action on failure, so the explicit put causes a double-put. Fixes: 9b07cdf ("pinctrl: cirrus: Fix fwnode leak in cs42l43_pin_probe()") Signed-off-by: Felix Gu <[email protected]> Reviewed-by: Charles Keepax <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent a2539b9 commit fd5bed7

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/pinctrl/cirrus/pinctrl-cs42l43.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -574,10 +574,9 @@ static int cs42l43_pin_probe(struct platform_device *pdev)
574574
if (child) {
575575
ret = devm_add_action_or_reset(&pdev->dev,
576576
cs42l43_fwnode_put, child);
577-
if (ret) {
578-
fwnode_handle_put(child);
577+
if (ret)
579578
return ret;
580-
}
579+
581580
if (!child->dev)
582581
child->dev = priv->dev;
583582
fwnode = child;

0 commit comments

Comments
 (0)