Skip to content

Commit d5b0b60

Browse files
committed
Merge branch 'pci/controller/mvebu'
- Use devm_add_action_or_reset() when adding port->clk devm cleanup action so we don't have to explicitly call clk_put() (Salah Triki) * pci/controller/mvebu: PCI: mvebu: Use devm_add_action_or_reset() instead of devm_add_action()
2 parents ed1e200 + c79a7ca commit d5b0b60

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/pci/controller/pci-mvebu.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,11 +1353,9 @@ static int mvebu_pcie_parse_port(struct mvebu_pcie *pcie,
13531353
goto skip;
13541354
}
13551355

1356-
ret = devm_add_action(dev, mvebu_pcie_port_clk_put, port);
1357-
if (ret < 0) {
1358-
clk_put(port->clk);
1356+
ret = devm_add_action_or_reset(dev, mvebu_pcie_port_clk_put, port);
1357+
if (ret < 0)
13591358
goto err;
1360-
}
13611359

13621360
return 1;
13631361

0 commit comments

Comments
 (0)