diff options
author | Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> | 2023-08-09 00:18:12 -0700 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2023-08-09 15:40:52 +0200 |
commit | 117d73b18441638b85b3963256c846509c6138f1 (patch) | |
tree | 1ae11d66df079bfe596445cbaae1ff2488682f56 | |
parent | 7fbfe6044229f9f69c7b5dfba2cf4d08a1824f15 (diff) | |
download | linux-117d73b18441638b85b3963256c846509c6138f1.tar.gz linux-117d73b18441638b85b3963256c846509c6138f1.tar.bz2 linux-117d73b18441638b85b3963256c846509c6138f1.zip |
mmc: sunplus: Fix platform_get_irq() error checking
The platform_get_irq() function returns negative error codes on failure.
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20230809071812.547229-2-harshit.m.mogalapalli@oracle.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/sunplus-mmc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/sunplus-mmc.c b/drivers/mmc/host/sunplus-mmc.c index 2bdebeb1f8e4..e9cb1a57cb75 100644 --- a/drivers/mmc/host/sunplus-mmc.c +++ b/drivers/mmc/host/sunplus-mmc.c @@ -885,7 +885,7 @@ static int spmmc_drv_probe(struct platform_device *pdev) return dev_err_probe(&pdev->dev, PTR_ERR(host->rstc), "rst get fail\n"); host->irq = platform_get_irq(pdev, 0); - if (host->irq <= 0) + if (host->irq < 0) return host->irq; ret = devm_request_threaded_irq(&pdev->dev, host->irq, |