Skip to content

Commit 676c7af

Browse files
outman119kuba-moo
authored andcommitted
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. Fixes: ebb1031 ("dpll: zl3073x: Refactor DPLL initialization") Reviewed-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: Felix Gu <ustc.gu@gmail.com> Link: https://patch.msgid.link/20260224-dpll-v2-1-d7786414a830@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 7c9db1a commit 676c7af

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

drivers/dpll/zl3073x/core.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -981,11 +981,7 @@ zl3073x_devm_dpll_init(struct zl3073x_dev *zldev, u8 num_dplls)
981981
}
982982

983983
/* Add devres action to release DPLL related resources */
984-
rc = devm_add_action_or_reset(zldev->dev, zl3073x_dev_dpll_fini, zldev);
985-
if (rc)
986-
goto error;
987-
988-
return 0;
984+
return devm_add_action_or_reset(zldev->dev, zl3073x_dev_dpll_fini, zldev);
989985

990986
error:
991987
zl3073x_dev_dpll_fini(zldev);

0 commit comments

Comments
 (0)