Subject: Re: [PATCH] soc: fsl: cpm1: qmc: fix error return code in qmc_probe()

From: Herve Codina <[email-masked]>
Date: Tue, 28 Nov 2023 14:21:58 +0100

Hi Yang,

On Tue, 28 Nov 2023 21:09:42 +0800
Yang Yingliang <[email-masked]> 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 <[email-masked]>
> ---
>  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 <[email-masked]>

Best regards,
Hervé