mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-02 04:41:10 -04:00
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: 9b07cdf86a ("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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user