Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Harshit Mogalapalli and committed by
Ulf Hansson
117d73b1 7fbfe604

+1 -1
+1 -1
drivers/mmc/host/sunplus-mmc.c
··· 885 885 return dev_err_probe(&pdev->dev, PTR_ERR(host->rstc), "rst get fail\n"); 886 886 887 887 host->irq = platform_get_irq(pdev, 0); 888 - if (host->irq <= 0) 888 + if (host->irq < 0) 889 889 return host->irq; 890 890 891 891 ret = devm_request_threaded_irq(&pdev->dev, host->irq,