All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Pan Chuang" <panchuang@vivo.com>
Cc: neil.armstrong@linaro.org, linux-amlogic@lists.infradead.org,
	media-ci@linuxtv.org
Subject: Re: [PATCH 1/3] media: cec: ao-cec: Remove redundant dev_err()
Date: Thu, 23 Jul 2026 10:01:23 +0000	[thread overview]
Message-ID: <20260723100124.279F31F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260723095500.523448-2-panchuang@vivo.com>

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

Pre-existing issues:
- [High] Missing check for `platform_get_irq()` returning a negative error code causes failures like `-EPROBE_DEFER` to be lost and converted into `-EINVAL`.
--

--- Patch [1]: [PATCH 1/3] media: cec: ao-cec: Remove redundant dev_err() ---
commit 1f47d2ef0ba63ca2af1f7aacf1d74819b91ea940
Author: Pan Chuang <panchuang@vivo.com>

media: cec: ao-cec: Remove redundant dev_err()

This commit removes redundant dev_err() calls after
devm_request_threaded_irq() in the Meson AO CEC drivers, as the core irq
code now logs these errors.

> diff --git a/drivers/media/cec/platform/meson/ao-cec-g12a.c b/drivers/media/cec/platform/meson/ao-cec-g12a.c
> --- a/drivers/media/cec/platform/meson/ao-cec-g12a.c
> +++ b/drivers/media/cec/platform/meson/ao-cec-g12a.c
> @@ -689,10 +689,8 @@ static int meson_ao_cec_g12a_probe(struct platform_device *pdev)
>  					meson_ao_cec_g12a_irq,
>  					meson_ao_cec_g12a_irq_thread,
>  					0, NULL, ao_cec);

[Severity: High]
This isn't a bug introduced by this patch, but since you are modifying the
error handling here, is there a missing check for irq < 0 before calling
devm_request_threaded_irq() in meson_ao_cec_g12a_probe()?

platform_get_irq() can return negative error codes like -EPROBE_DEFER.
Because devm_request_threaded_irq() takes an unsigned int for the IRQ number,
a negative value gets cast to a large positive integer and fails with -EINVAL.

This masks the original -EPROBE_DEFER and causes the probe to fail permanently
instead of deferring.

> -	if (ret) {
> -		dev_err(&pdev->dev, "irq request failed\n");
> +	if (ret)
>  		goto out_probe_adapter;
> -	}

[ ... ]

> diff --git a/drivers/media/cec/platform/meson/ao-cec.c b/drivers/media/cec/platform/meson/ao-cec.c
> --- a/drivers/media/cec/platform/meson/ao-cec.c
> +++ b/drivers/media/cec/platform/meson/ao-cec.c
> @@ -636,10 +636,8 @@ static int meson_ao_cec_probe(struct platform_device *pdev)
>  					meson_ao_cec_irq,
>  					meson_ao_cec_irq_thread,
>  					0, NULL, ao_cec);

[Severity: High]
This is the same pre-existing issue as above, but in meson_ao_cec_probe().
Does this irq value need to be checked for < 0 before it gets implicitly cast
to an unsigned int by devm_request_threaded_irq(), masking -EPROBE_DEFER?

> -	if (ret) {
> -		dev_err(&pdev->dev, "irq request failed\n");
> +	if (ret)
>  		goto out_probe_adapter;
> -	}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260723095500.523448-1-panchuang@vivo.com?part=1

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

  reply	other threads:[~2026-07-23 10:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23  9:54 [PATCH 0/3] media: cec: Remove redundant error messages on IRQ request failure Pan Chuang
2026-07-23  9:54 ` Pan Chuang
2026-07-23  9:54 ` [PATCH 1/3] media: cec: ao-cec: Remove redundant dev_err() Pan Chuang
2026-07-23  9:54   ` Pan Chuang
2026-07-23 10:01   ` sashiko-bot [this message]
2026-07-23  9:54 ` [PATCH 2/3] media: cec: seco: " Pan Chuang
2026-07-23  9:54 ` [PATCH 3/3] media: cec: tegra: " Pan Chuang

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=20260723100124.279F31F000E9@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=panchuang@vivo.com \
    --cc=sashiko-reviews@lists.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 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.