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 <yangyingli...@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