From: Ivan Vecera <ivecera@redhat.com>
To: Felix Gu <ustc.gu@gmail.com>,
Prathosh Satish <Prathosh.Satish@microchip.com>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>,
Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
Jiri Pirko <jiri@resnulli.us>, Jakub Kicinski <kuba@kernel.org>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dpll: zl3073x: Remove redundant cleanup in devm_dpll_init()
Date: Mon, 23 Feb 2026 15:17:46 +0100 [thread overview]
Message-ID: <d0a3a425-689a-4d97-8940-05bf83b7b513@redhat.com> (raw)
In-Reply-To: <20260223-dpll-v1-1-d99f18c12bae@gmail.com>
On 2/23/26 2:20 PM, Felix Gu 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")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
> drivers/dpll/zl3073x/core.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/dpll/zl3073x/core.c b/drivers/dpll/zl3073x/core.c
> index 63bd97181b9e..4ad21caec0e8 100644
> --- a/drivers/dpll/zl3073x/core.c
> +++ b/drivers/dpll/zl3073x/core.c
> @@ -982,10 +982,8 @@ 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 rc;
Please use:
return devm_add_action_or_reset(...);
Otherwise, LGTM. With this change:
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
next prev parent reply other threads:[~2026-02-23 14:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 13:20 [PATCH] dpll: zl3073x: Remove redundant cleanup in devm_dpll_init() Felix Gu
2026-02-23 14:17 ` Ivan Vecera [this message]
2026-02-24 10:13 ` Felix Gu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d0a3a425-689a-4d97-8940-05bf83b7b513@redhat.com \
--to=ivecera@redhat.com \
--cc=Prathosh.Satish@microchip.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=przemyslaw.kitszel@intel.com \
--cc=ustc.gu@gmail.com \
--cc=vadim.fedorenko@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox