Re: [PATCH] spi: omap2-mcspi: Fix probe so driver works again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux