mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Pei Xiao <xiaopei01@kylinos.cn>,
	herve.codina@bootlin.com, qiang.zhao@nxp.com,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Cc: dan.carpenter@linaro.org, xiaopeitux@foxmail.com
Subject: Re: [PATCH] soc: fsl: cpm1: qmc: Fix qmc_probe() warn missing error code ret
Date: Wed, 20 Nov 2024 12:05:27 +0100	[thread overview]
Message-ID: <83d92bcb-b025-4595-8d77-0c5546b84518@csgroup.eu> (raw)
In-Reply-To: <82d8c18da160b9e0a73c5c5e2eb25ad2831cc6f9.1732095360.git.xiaopei01@kylinos.cn>



Le 20/11/2024 à 10:38, Pei Xiao a écrit :
> [Vous ne recevez pas souvent de courriers de xiaopei01@kylinos.cn. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
> 
> platform_get_irq() may failed,but ret still equals to 0,
> will cacuse qmc_probe() return 0 but fail.
> 
> 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")
> Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
> ---
>   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 19cc581b06d0..a78768cd6007 100644
> --- a/drivers/soc/fsl/qe/qmc.c
> +++ b/drivers/soc/fsl/qe/qmc.c
> @@ -2004,8 +2004,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 = -EINVAL;

Why force -EINVAL ?

What if platform_get_irq() returns -EPROBE_DEFER ?

Anyway, this problem is already fixed by 
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20241105145623.401528-1-herve.codina@bootlin.com/ 
which is on its way to mainline.

>                  goto err_exit_xcc;
> +       }
>          ret = devm_request_irq(qmc->dev, irq, qmc_irq_handler, 0, "qmc", qmc);
>          if (ret < 0)
>                  goto err_exit_xcc;
> --
> 2.34.1
> 

      parent reply	other threads:[~2024-11-20 11:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05  6:46 drivers/soc/fsl/qe/qmc.c:1942 qmc_probe() warn: missing error code 'ret' Dan Carpenter
2024-11-20  9:38 ` [PATCH] soc: fsl: cpm1: qmc: Fix qmc_probe() warn missing error code ret Pei Xiao
2024-11-20 11:05   ` Herve Codina
2024-11-21  0:57     ` Pei Xiao
2024-11-20 11:05   ` Christophe Leroy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83d92bcb-b025-4595-8d77-0c5546b84518@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=dan.carpenter@linaro.org \
    --cc=herve.codina@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=qiang.zhao@nxp.com \
    --cc=xiaopei01@kylinos.cn \
    --cc=xiaopeitux@foxmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®