mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
PCI: mvebu: Use devm_add_action_or_reset() instead of devm_add_action()
Replace devm_add_action() with devm_add_action_or_reset() to avoid explicitly dropping the 'port->clk' reference in error path. Signed-off-by: Salah Triki <salah.triki@gmail.com> [mani: reworded commit subject and description] Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Link: https://patch.msgid.link/aHsgYALHfQbrgq0t@pc
This commit is contained in:
parent
19272b37aa
commit
c79a7ca8fb
|
|
@ -1353,11 +1353,9 @@ static int mvebu_pcie_parse_port(struct mvebu_pcie *pcie,
|
|||
goto skip;
|
||||
}
|
||||
|
||||
ret = devm_add_action(dev, mvebu_pcie_port_clk_put, port);
|
||||
if (ret < 0) {
|
||||
clk_put(port->clk);
|
||||
ret = devm_add_action_or_reset(dev, mvebu_pcie_port_clk_put, port);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user