summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-omap2-mcspi.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-09-21 09:24:51 +0200
committerMark Brown <broonie@kernel.org>2022-09-21 11:28:20 +0200
commite0437512081282559f5c50591f487149c31f867c (patch)
tree27b1402f4d121048c778fcdd6315b3863d30dc1f /drivers/spi/spi-omap2-mcspi.c
parentspi: spi-loopback-test: Add test to trigger DMA/PIO mixing (diff)
downloadlinux-e0437512081282559f5c50591f487149c31f867c.tar.xz
linux-e0437512081282559f5c50591f487149c31f867c.zip
spi: omap2-mcspi: Fix probe so driver works again
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> Reviewed-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/Yyq8Q/kd301wVzg8@kili Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-omap2-mcspi.c')
-rw-r--r--drivers/spi/spi-omap2-mcspi.c2
1 files changed, 1 insertions, 1 deletions
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;
}