[PATCH] soc: fsl: cpm1: qmc: fix error return code in qmc_probe()
Yang Yingliang
yangyingliang at huawei.com
Wed Nov 29 00:09:42 AEDT 2023
If platform_get_irq() fails, it need return error code in
qmc_probe().
Fixes: 3178d58e0b97 ("soc: fsl: cpm1: Add support for QMC")
Signed-off-by: Yang Yingliang <yangyingliang at huawei.com>
---
drivers/soc/fsl/qe/qmc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c
index 92ec76c03965..65109f279a6b 100644
--- a/drivers/soc/fsl/qe/qmc.c
+++ b/drivers/soc/fsl/qe/qmc.c
@@ -1386,8 +1386,10 @@ static int qmc_probe(struct platform_device *pdev)
qmc_write16(qmc->scc_regs + SCC_SCCM, 0x0000);
qmc_write16(qmc->scc_regs + SCC_SCCE, 0x000F);
irq = platform_get_irq(pdev, 0);
- if (irq < 0)
+ if (irq < 0) {
+ ret = irq;
goto err_tsa_serial_disconnect;
+ }
ret = devm_request_irq(qmc->dev, irq, qmc_irq_handler, 0, "qmc", qmc);
if (ret < 0)
goto err_tsa_serial_disconnect;
--
2.25.1
More information about the Linuxppc-dev
mailing list