dpll: zl3073x: Remove redundant cleanup in devm_dpll_init()
Subsystems (4)
PATCH v2 1/1 dpll: zl3073x: Remove redundant cleanup in devm_dpll_init()
The devm_add_action_or_reset() function already executes the cleanup action on failure before returning an error, so the explicit goto error and subsequent zl3073x_dev_dpll_fini() call causes double cleanup.
---
Changes in v2:
- Fix Ivan's comment
- Link to v1: https://lore.kernel.org/r/[email protected]
--- drivers/dpll/zl3073x/core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/dpll/zl3073x/core.c +1 -5
@@ -981,11 +981,7 @@ zl3073x_devm_dpll_init(struct zl3073x_dev *zldev, u8 num_dplls) }/* Add devres action to release DPLL related resources */ - rc =devm_add_action_or_reset (zldev->dev, zl3073x_dev_dpll_fini, zldev); -if (rc) - goto error; - -return 0 ; +return devm_add_action_or_reset (zldev->dev, zl3073x_dev_dpll_fini, zldev); error:zl3073x_dev_dpll_fini (zldev);
---
base-commit: d4906ae14a5f136ceb671bb14cedbf13fa560da6
change-id: 20260223-dpll-40c3c8b2ab38
Best regards,
Signature · 1 line
Felix Gu <[email protected]>
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Tue, 24 Feb 2026 19:04:04 +0800 you wrote:
The
devm_add_action_or_reset()function already executes the cleanup action on failure before returning an error, so the explicit goto error and subsequentzl3073x_dev_dpll_fini()call causes double cleanup.Fixes ebb1031c5137 ("dpll: zl3073x: Refactor DPLL initialization")Reviewed-by Ivan Vecera <[email protected]>Signed-off-by Felix Gu <[email protected]>[...]
Here is the summary with links:
- [v2] dpll: zl3073x: Remove redundant cleanup in devm_dpll_init()
https://git.kernel.org/netdev/net/c/676c7af91fcd
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html