* [PATCH] soc: qcom: llcc-qcom: Handle errors from optional IRQ lookup
@ 2026-08-10 5:10 phucduc.bui
0 siblings, 0 replies; only message in thread
From: phucduc.bui @ 2026-08-10 5:10 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() 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;
+
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] only message in thread
only message in thread, other threads:[~2026-08-10 5:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-10 5:10 [PATCH] soc: qcom: llcc-qcom: Handle errors from optional IRQ lookup phucduc.bui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox