* [PATCH v2] soc: qcom: llcc-qcom: Handle errors from optional IRQ lookup
@ 2026-08-19 10:26 phucduc.bui
2026-08-19 10:30 ` Konrad Dybcio
0 siblings, 1 reply; 2+ messages in thread
From: phucduc.bui @ 2026-08-19 10:26 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio; +Cc: linux-arm-msm, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
platform_get_irq_optional() returns a positive IRQ number on success or
a negative error code on failure. For an optional IRQ, -ENXIO indicates
that no optional IRQ is available. Other errors, such as -EPROBE_DEFER
and -EINVAL, should be propagated so that the caller can handle them
appropriately.
Propagate negative errors other than -ENXIO.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
Link v1:
https://lore.kernel.org/all/20260810051031.26656-1-phucduc.bui@gmail.com/
Changes in v2:
- Drop the unnecessary check for a positive return value.
- Update the commit message to reflect the existing error handling.
drivers/soc/qcom/llcc-qcom.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c
index 733999867bbf..b166d45cdb6f 100644
--- a/drivers/soc/qcom/llcc-qcom.c
+++ b/drivers/soc/qcom/llcc-qcom.c
@@ -5617,6 +5617,10 @@ static int qcom_llcc_probe(struct platform_device *pdev)
}
drv_data->ecc_irq = platform_get_irq_optional(pdev, 0);
+ if (drv_data->ecc_irq < 0 && drv_data->ecc_irq != -ENXIO)
+ return dev_err_probe(&pdev->dev, drv_data->ecc_irq,
+ "failed to get IRQ resource\n");
+
drv_data->edac_reg_offset = cfg->edac_reg_offset;
drv_data->ecc_irq_configured = cfg->irq_configured;
drv_data->dev = dev;
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] soc: qcom: llcc-qcom: Handle errors from optional IRQ lookup
2026-08-19 10:26 [PATCH v2] soc: qcom: llcc-qcom: Handle errors from optional IRQ lookup phucduc.bui
@ 2026-08-19 10:30 ` Konrad Dybcio
0 siblings, 0 replies; 2+ messages in thread
From: Konrad Dybcio @ 2026-08-19 10:30 UTC (permalink / raw)
To: phucduc.bui, Bjorn Andersson, Konrad Dybcio; +Cc: linux-arm-msm, linux-kernel
On 8/19/26 12:26 PM, phucduc.bui@gmail.com wrote:
> From: bui duc phuc <phucduc.bui@gmail.com>
>
> platform_get_irq_optional() returns a positive IRQ number on success or
> a negative error code on failure. For an optional IRQ, -ENXIO indicates
> that no optional IRQ is available. Other errors, such as -EPROBE_DEFER
> and -EINVAL, should be propagated so that the caller can handle them
> appropriately.
>
> Propagate negative errors other than -ENXIO.
>
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-19 10:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-19 10:26 [PATCH v2] soc: qcom: llcc-qcom: Handle errors from optional IRQ lookup phucduc.bui
2026-08-19 10:30 ` Konrad Dybcio
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.