mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 02:44:41 +01: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:
parent
a2539b92e4
commit
fd5bed798f
1 changed files with 2 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue