* [PATCH v2] dpll: zl3073x: Remove redundant cleanup in devm_dpll_init()
@ 2026-02-24 11:04 Felix Gu
2026-02-26 3:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Felix Gu @ 2026-02-24 11:04 UTC (permalink / raw)
To: Ivan Vecera, Prathosh Satish, Vadim Fedorenko,
Arkadiusz Kubalewski, Jiri Pirko, Jakub Kicinski, Przemek Kitszel
Cc: netdev, linux-kernel, Felix Gu
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.
Fixes: ebb1031c5137 ("dpll: zl3073x: Refactor DPLL initialization")
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
Changes in v2:
- Fix Ivan's comment
- Link to v1: https://lore.kernel.org/r/20260223-dpll-v1-1-d99f18c12bae@gmail.com
---
drivers/dpll/zl3073x/core.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/dpll/zl3073x/core.c b/drivers/dpll/zl3073x/core.c
index 63bd97181b9e..569c2cda5a02 100644
--- a/drivers/dpll/zl3073x/core.c
+++ b/drivers/dpll/zl3073x/core.c
@@ -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,
--
Felix Gu <ustc.gu@gmail.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] dpll: zl3073x: Remove redundant cleanup in devm_dpll_init()
2026-02-24 11:04 [PATCH v2] dpll: zl3073x: Remove redundant cleanup in devm_dpll_init() Felix Gu
@ 2026-02-26 3:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-02-26 3:20 UTC (permalink / raw)
To: Felix Gu
Cc: ivecera, Prathosh.Satish, vadim.fedorenko, arkadiusz.kubalewski,
jiri, kuba, przemyslaw.kitszel, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
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 subsequent zl3073x_dev_dpll_fini() call causes double cleanup.
>
> Fixes: ebb1031c5137 ("dpll: zl3073x: Refactor DPLL initialization")
> Reviewed-by: Ivan Vecera <ivecera@redhat.com>
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
>
> [...]
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-26 3:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-24 11:04 [PATCH v2] dpll: zl3073x: Remove redundant cleanup in devm_dpll_init() Felix Gu
2026-02-26 3:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox