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
next prev parent reply other threads:[~2026-07-22 10:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 10:23 [PATCH v3 00/13] Fix leaks in rc core Sean Young
2026-07-22 10:23 ` [PATCH v3 01/13] media: streamzap: Add missing rc_unregister_device() Sean Young
2026-07-22 10:23 ` [PATCH v3 02/13] media: redrat3: Ensure rc device is freed if enable_detector() fails Sean Young
2026-07-22 10:23 ` [PATCH v3 03/13] media: redrat3: Ensure we don't read beyond the end of the packet Sean Young
2026-07-22 10:23 ` [PATCH v3 04/13] media: redrat3: Ensure all urbs are suspended Sean Young
2026-07-22 10:23 ` [PATCH v3 05/13] media: redrat3: Error path leaves device in transmitting state Sean Young
2026-07-22 10:23 ` [PATCH v3 06/13] media: sunxi-cir: Ensure no more interrupts can occur before free Sean Young
2026-07-22 10:36 ` sashiko-bot
2026-07-22 10:23 ` [PATCH v3 07/13] media: meson-ir-tx: Ensure clock is disabled on unbind Sean Young
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 ` Sean Young
2026-07-22 10:23 ` [PATCH v3 09/13] media: meson-ir-tx: Ensure probe error is propagated Sean Young
2026-07-22 10:23 ` Sean Young
2026-07-22 10:23 ` [PATCH v3 10/13] media: ir-hix5hd2: Ensure rdev is setup before interrupts are enabled Sean Young
2026-07-22 10:23 ` [PATCH v3 11/13] media: rc: Use after free in ir_raw_event_handle() Sean Young
2026-07-22 10:23 ` [PATCH v3 12/13] media: rc: Fix use after free in bpf progs Sean Young
2026-07-22 10:49 ` sashiko-bot
2026-07-22 10:23 ` [PATCH v3 13/13] media: rc: Fix race condition during rc_register_device() 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.