kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Mark Brown <broonie@kernel.org>
Cc: <linux-spi@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
	<yangyingliang@huawei.com>
Subject: Re: [PATCH] spi: omap2-mcspi: Fix probe so driver works again
Date: Wed, 21 Sep 2022 15:46:33 +0800	[thread overview]
Message-ID: <06f57122-f173-1d80-0854-26f21cd90a83@huawei.com> (raw)
In-Reply-To: <Yyq8Q/kd301wVzg8@kili>

Hi Dan,

On 2022/9/21 15:24, Dan Carpenter wrote:
> This condition was accidentally changed from "if (status < 0)" to
> "if (status)".  The platform_get_irq() function returns non-zero
> positive values on success so, unfortunately, the driver could not be
> used.  Change the condition back to how it was.
>
> Fixes: f4ca8c88c2c7 ("spi: omap2-mcspi: Switch to use dev_err_probe() helper")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> Sorry, if you recieve this twice.  There is a bug in the msmtp program
> so the first email I send every day is lost and I think this was my
> first email.  Resending.
>
>   drivers/spi/spi-omap2-mcspi.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
> index 80e79f3aa0c4..6ba9b0d7710b 100644
> --- a/drivers/spi/spi-omap2-mcspi.c
> +++ b/drivers/spi/spi-omap2-mcspi.c
> @@ -1509,7 +1509,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
>   	}
>   
>   	status = platform_get_irq(pdev, 0);
> -	if (status) {
> +	if (status < 0) {
>   		dev_err_probe(&pdev->dev, status, "no irq resource found\n");
>   		goto free_master;
>   	}

Good catch !

I made a mistake in my patch, thanks for fixing this.

Reviewed-by: Yang Yingliang <yangyingliang@huawei.com>


  reply	other threads:[~2022-09-21  7:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21  7:24 [PATCH] spi: omap2-mcspi: Fix probe so driver works again Dan Carpenter
2022-09-21  7:46 ` Yang Yingliang [this message]
2022-09-21 12:38 ` Mark Brown

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=06f57122-f173-1d80-0854-26f21cd90a83@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=broonie@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).