Skip to content

Commit cb3daa5

Browse files
hcodinachleroy
authored andcommitted
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: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/r/[email protected]/ Fixes: 3178d58 ("soc: fsl: cpm1: Add support for QMC") Cc: [email protected] Signed-off-by: Herve Codina <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christophe Leroy <[email protected]>
1 parent c9f1efa commit cb3daa5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/soc/fsl/qe/qmc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2005,8 +2005,10 @@ static int qmc_probe(struct platform_device *pdev)
20052005

20062006
/* Set the irq handler */
20072007
irq = platform_get_irq(pdev, 0);
2008-
if (irq < 0)
2008+
if (irq < 0) {
2009+
ret = irq;
20092010
goto err_exit_xcc;
2011+
}
20102012
ret = devm_request_irq(qmc->dev, irq, qmc_irq_handler, 0, "qmc", qmc);
20112013
if (ret < 0)
20122014
goto err_exit_xcc;

0 commit comments

Comments
 (0)