linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soc: fsl: cpm1: qmc: fix error return code in qmc_probe()
@ 2023-11-28 13:09 Yang Yingliang
  2023-11-28 13:21 ` Herve Codina
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2023-11-28 13:09 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: herve.codina, leoyang.li, broonie, yangyingliang, qiang.zhao

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] soc: fsl: cpm1: qmc: fix error return code in qmc_probe()
  2023-11-28 13:09 [PATCH] soc: fsl: cpm1: qmc: fix error return code in qmc_probe() Yang Yingliang
@ 2023-11-28 13:21 ` Herve Codina
  0 siblings, 0 replies; 2+ messages in thread
From: Herve Codina @ 2023-11-28 13:21 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: broonie, leoyang.li, linuxppc-dev, qiang.zhao

Hi Yang,

On Tue, 28 Nov 2023 21:09:42 +0800
Yang Yingliang <yangyingliang@huawei.com> wrote:

> 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@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;

Thanks for this patch.

Acked-by: Herve Codina <herve.codina@bootlin.com>

Best regards,
Hervé

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-28 13:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-28 13:09 [PATCH] soc: fsl: cpm1: qmc: fix error return code in qmc_probe() Yang Yingliang
2023-11-28 13:21 ` Herve Codina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).