From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: phucduc.bui@gmail.com, Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc: qcom: llcc-qcom: Handle errors from optional IRQ lookup
Date: Tue, 18 Aug 2026 11:22:44 +0200 [thread overview]
Message-ID: <90c9dca7-5873-43eb-b9bf-1c8dd2c0093d@oss.qualcomm.com> (raw)
In-Reply-To: <20260810051031.26656-1-phucduc.bui@gmail.com>
On 8/10/26 7:10 AM, phucduc.bui@gmail.com wrote:
> From: bui duc phuc <phucduc.bui@gmail.com>
>
> platform_get_irq_optional() can return errors such as -EPROBE_DEFER,
> but the driver currently stores the return value directly in
> drv_data->ecc_irq and continues probing.
>
> Propagate negative errors other than -ENXIO using dev_err_probe(), and
> only assign the IRQ to drv_data->ecc_irq when a valid IRQ number is
> returned.
>
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
> drivers/soc/qcom/llcc-qcom.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c
> index 8948b5fd42d2..e42946810b50 100644
> --- a/drivers/soc/qcom/llcc-qcom.c
> +++ b/drivers/soc/qcom/llcc-qcom.c
> @@ -5587,7 +5587,12 @@ static int qcom_llcc_probe(struct platform_device *pdev)
> goto err;
> }
>
> - drv_data->ecc_irq = platform_get_irq_optional(pdev, 0);
> + ret = platform_get_irq_optional(pdev, 0);
> + if (ret < 0 && ret != -ENXIO)
> + return dev_err_probe(&pdev->dev, ret, "failed to get IRQ resource\n");
> + if (ret > 0)
> + drv_data->ecc_irq = ret;
Techinically you can drop the second if-statement
Konrad
next prev parent reply other threads:[~2026-08-18 9:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 5:10 phucduc.bui
2026-08-18 9:22 ` Konrad Dybcio [this message]
2026-08-18 10:34 ` Bui Duc Phuc
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=90c9dca7-5873-43eb-b9bf-1c8dd2c0093d@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phucduc.bui@gmail.com \
/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
all inboxes | Powered by JetHome®