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: f4ca8c88c2 ("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>
This commit is contained in:
Dan Carpenter 2022-09-21 10:24:51 +03:00 committed by Mark Brown
parent b85ad8a54e
commit e043751208
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 1 deletions

View File

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