Skip to contentSkip to conversation

MMC: meson: remove redundant return value check of platform_get_resource()

PATCH New Wei Yongjun 1 participant 1 message Aug 20, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MMC: meson: remove redundant return value check of platform_get_resource()

Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource().

---
 drivers/mmc/host/meson-gxbb.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/mmc/host/meson-gxbb.c +0 -4
index 10eac41..96cd883 100644
@@ -811,10 +811,6 @@ static int meson_mmc_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		ret = -ENODEV;
-		goto free_host;
-	}
 	host->regs = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(host->regs)) {
 		ret = PTR_ERR(host->regs);