diff options
| author | Herve Codina <herve.codina@bootlin.com> | 2024-11-05 15:56:23 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-14 19:59:42 +0100 |
| commit | 395d9b40431c163e4d7818fe4efbfbf09507ac39 (patch) | |
| tree | acd79be6371d2ae1053dcfe94aa22d927f06b94f /drivers/soc | |
| parent | 6885d8e7c1e3b881f1e39c47e77204a8badd02fe (diff) | |
| download | linux-395d9b40431c163e4d7818fe4efbfbf09507ac39.tar.gz linux-395d9b40431c163e4d7818fe4efbfbf09507ac39.tar.bz2 linux-395d9b40431c163e4d7818fe4efbfbf09507ac39.zip | |
soc: fsl: cpm1: qmc: Set the ret error code on platform_get_irq() failure
[ Upstream commit cb3daa51db819a172e9524e96e2ed96b4237e51a ]
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 <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202411051350.KNy6ZIWA-lkp@intel.com/
Fixes: 3178d58e0b97 ("soc: fsl: cpm1: Add support for QMC")
Cc: stable@vger.kernel.org
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/20241105145623.401528-1-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/soc')
| -rw-r--r-- | drivers/soc/fsl/qe/qmc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c index 9fa75effcfc0..f1720c7cbe06 100644 --- a/drivers/soc/fsl/qe/qmc.c +++ b/drivers/soc/fsl/qe/qmc.c @@ -1420,8 +1420,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; |
