Skip to contentSkip to conversation

mmc: meson-gx-mmc: Fix checking return value of platform_get_irq

PATCH New Axel Lin 1 participant 1 message Dec 3, 2017

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 mmc: meson-gx-mmc: Fix checking return value of platform_get_irq

platform_get_irq() returns negative value on failure.

---
 drivers/mmc/host/meson-gx-mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/meson-gx-mmc.c +1 -1
index e0862d3f65b3..11c467b52902 100644
@@ -1208,7 +1208,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
 	}
 
 	irq = platform_get_irq(pdev, 0);
-	if (!irq) {
+	if (irq < 0) {
 		dev_err(&pdev->dev, "failed to get interrupt resource.\n");
 		ret = -EINVAL;
 		goto free_host;
Signature · 1 line
2.11.0