Skip to content
Snippets Groups Projects
Commit cb3daa51 authored by Herve Codina's avatar Herve Codina Committed by Christophe Leroy
Browse files

soc: fsl: cpm1: qmc: Set the ret error code on platform_get_irq() failure


A kernel test robot detected a missing error code:
   qmc.c:1942 qmc_probe() warn: missing error code 'ret'

Indeed, the error returned by platform_get_irq() is checked and the
operation is aborted in case of failure but the ret error code is
not set in that case.

Set the ret error code.

Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202411051350.KNy6ZIWA-lkp@intel.com/


Fixes: 3178d58e ("soc: fsl: cpm1: Add support for QMC")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarHerve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/20241105145623.401528-1-herve.codina@bootlin.com


Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
parent c9f1efab
No related branches found
No related tags found
No related merge requests found
......@@ -2005,8 +2005,10 @@ static int qmc_probe(struct platform_device *pdev)
/* Set the irq handler */
irq = platform_get_irq(pdev, 0);
if (irq < 0)
if (irq < 0) {
ret = irq;
goto err_exit_xcc;
}
ret = devm_request_irq(qmc->dev, irq, qmc_irq_handler, 0, "qmc", qmc);
if (ret < 0)
goto err_exit_xcc;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment