soc: qcom: llcc-qcom: Handle errors from optional IRQ lookup
Subsystems (2)
PATCH v2 1/1 soc: qcom: llcc-qcom: Handle errors from optional IRQ lookup
From: bui duc phuc <[email protected]>
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.
---
Link v1:
https://lore.kernel.org/all/[email protected]/
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(+)
drivers/soc/qcom/llcc-qcom.c +4 -0
@@ -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;
Signature · 1 line
2.43.0
Quoted 8 lines · On 8/19/26 12:26 PM, [email protected] wrote:
From: bui duc phuc <[email protected]>
platform_get_irq_optional()returns a positive IRQ number on success or a negative error code on failure. For an optional IRQ,-ENXIOindicates 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.
Quoted 4 lines
Propagate negative errors other than
-ENXIO.Signed-off-by bui duc phuc <[email protected]>---
Konrad
Quoted 9 lines · On Wed, 19 Aug 2026 17:26:30 +0700, [email protected] wrote:
platform_get_irq_optional()returns a positive IRQ number on success or a negative error code on failure. For an optional IRQ,-ENXIOindicates 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.[...]
Applied, thanks!
[1/1] soc: qcom: llcc-qcom: Handle errors from optional IRQ lookup
commit: 1ceb3431910f30334c16e3209ec79aff44ffdc9a
Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>