Commit 117d73b1 authored by Harshit Mogalapalli's avatar Harshit Mogalapalli Committed by Ulf Hansson

mmc: sunplus: Fix platform_get_irq() error checking

The platform_get_irq() function returns negative error codes on failure.
Signed-off-by: default avatarHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20230809071812.547229-2-harshit.m.mogalapalli@oracle.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 7fbfe604
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment