mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sean Young" <sean@mess.org>
Cc: media-ci@linuxtv.org, linux-amlogic@lists.infradead.org,
	neil.armstrong@linaro.org
Subject: Re: [PATCH v3 07/13] media: meson-ir-tx: Ensure clock is disabled on unbind
Date: Wed, 22 Jul 2026 10:34:34 +0000	[thread overview]
Message-ID: <20260722103434.B3D751F000E9@smtp.kernel.org> (raw)
In-Reply-To: <ff9948f8d30ceb0f7d2c962097798dc9ed8a1a40.1784715737.git.sean@mess.org>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:

Pre-existing issues:
- [High] This problem wasn't introduced by this patch, but the error code from `devm_clk_get_enabled()` is unconditionally masked with `-ENODEV`, which breaks probe deferral.
- [High] This problem wasn't introduced by this patch, but the error return from `platform_get_irq()` is masked by returning `-ENODEV`, breaking probe deferral.
--

--- Patch [7]: [PATCH v3 07/13] media: meson-ir-tx: Ensure clock is disabled on unbind ---
commit 902362d56de8e550d8a16fef5053c172039aa2ab
Author: Sean Young <sean@mess.org>
Subject: media: meson-ir-tx: Ensure clock is disabled on unbind

This commit replaces the manual devm_clk_get and clk_prepare_enable calls
with devm_clk_get_enabled. This ensures that the clock is properly
disabled when the driver is unbound.

> diff --git a/drivers/media/rc/meson-ir-tx.c b/drivers/media/rc/meson-ir-tx.c
> index fded2c256f2a6..e7bb107e6a843 100644
> --- a/drivers/media/rc/meson-ir-tx.c
> +++ b/drivers/media/rc/meson-ir-tx.c
> @@ -288,8 +288,8 @@ static int meson_irtx_mod_clock_probe(struct meson_irtx *ir,
>  	if (!np)
>  		return -ENODEV;
>  
> -	clock = devm_clk_get(ir->dev, "xtal");
> -	if (IS_ERR(clock) || clk_prepare_enable(clock))
> +	clock = devm_clk_get_enabled(ir->dev, "xtal");
> +	if (IS_ERR(clock))
>  		return -ENODEV;

[Severity: High]
This is a pre-existing issue, but does dropping the actual error code from
devm_clk_get_enabled() and returning -ENODEV break probe deferral?

If the clock provider isn't ready, devm_clk_get_enabled() returns
-EPROBE_DEFER, which gets masked here. Should this return PTR_ERR(clock)
instead?

[ ... ]

While reviewing this file, I also noticed another pre-existing issue in
the same driver:

drivers/media/rc/meson-ir-tx.c:meson_irtx_probe() {
    ...
    irq = platform_get_irq(pdev, 0);
    if (irq < 0)
        return -ENODEV;
    ...
}

[Severity: High]
This isn't a bug introduced by this patch, but would returning a hardcoded
-ENODEV here break probe deferral if the interrupt controller is not yet
ready?

When platform_get_irq() returns -EPROBE_DEFER, it seems the code currently
discards it. Would returning the actual error code be more appropriate?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1784715737.git.sean@mess.org?part=7

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2026-07-22 10:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1784715737.git.sean@mess.org>
2026-07-22 10:23 ` Sean Young
2026-07-22 10:34   ` sashiko-bot [this message]
2026-07-22 10:23 ` [PATCH v3 08/13] media: meson-ir-tx: Ensure rc_free_device() is called " Sean Young
2026-07-22 10:23 ` [PATCH v3 09/13] media: meson-ir-tx: Ensure probe error is propagated Sean Young

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=20260722103434.B3D751F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=media-ci@linuxtv.org \
    --cc=neil.armstrong@linaro.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=sean@mess.org \
    /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

Powered by JetHome