aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller
diff options
context:
space:
mode:
authorSalah Triki <[email protected]>2025-07-19 04:34:40 +0000
committerManivannan Sadhasivam <[email protected]>2025-07-23 16:32:50 +0000
commitc79a7ca8fb72a17db03e916438c44d9afc98998f (patch)
treeb683759b465b3b20bd590ef96d3e8bbff8d44b70 /drivers/pci/controller
parentLinux 6.16-rc1 (diff)
downloadkernel-c79a7ca8fb72a17db03e916438c44d9afc98998f.tar.gz
kernel-c79a7ca8fb72a17db03e916438c44d9afc98998f.zip
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 <[email protected]> [mani: reworded commit subject and description] Signed-off-by: Manivannan Sadhasivam <[email protected]> Link: https://patch.msgid.link/aHsgYALHfQbrgq0t@pc
Diffstat (limited to 'drivers/pci/controller')
-rw-r--r--drivers/pci/controller/pci-mvebu.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c
index a4a2bac4f4b2..755651f33811 100644
--- a/drivers/pci/controller/pci-mvebu.c
+++ b/drivers/pci/controller/pci-mvebu.c
@@ -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;