All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: omap2-mcspi: Fix probe so driver works again
@ 2022-09-21  7:24 Dan Carpenter
  2022-09-21  7:46 ` Yang Yingliang
  2022-09-21 12:38 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2022-09-21  7:24 UTC (permalink / raw)
  To: Mark Brown, Yang Yingliang; +Cc: linux-spi, kernel-janitors

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;
 	}
-- 
2.35.1


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

* Re: [PATCH] spi: omap2-mcspi: Fix probe so driver works again
  2022-09-21  7:24 [PATCH] spi: omap2-mcspi: Fix probe so driver works again Dan Carpenter
@ 2022-09-21  7:46 ` Yang Yingliang
  2022-09-21 12:38 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Yang Yingliang @ 2022-09-21  7:46 UTC (permalink / raw)
  To: Dan Carpenter, Mark Brown; +Cc: linux-spi, kernel-janitors, yangyingliang

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>


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

* Re: [PATCH] spi: omap2-mcspi: Fix probe so driver works again
  2022-09-21  7:24 [PATCH] spi: omap2-mcspi: Fix probe so driver works again Dan Carpenter
  2022-09-21  7:46 ` Yang Yingliang
@ 2022-09-21 12:38 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-09-21 12:38 UTC (permalink / raw)
  To: Yang Yingliang, Dan Carpenter; +Cc: linux-spi, kernel-janitors

On Wed, 21 Sep 2022 10:24:51 +0300, 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.
> 
> 

Applied to

   broonie/spi.git for-next

Thanks!

[1/1] spi: omap2-mcspi: Fix probe so driver works again
      commit: e0437512081282559f5c50591f487149c31f867c

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

end of thread, other threads:[~2022-09-21 12:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21  7:24 [PATCH] spi: omap2-mcspi: Fix probe so driver works again Dan Carpenter
2022-09-21  7:46 ` Yang Yingliang
2022-09-21 12:38 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.