MMC: meson: remove redundant return value check of platform_get_resource()
authorWei Yongjun <weiyj.lk@gmail.com>
Sat, 20 Aug 2016 15:30:16 +0000 (15:30 +0000)
committerKevin Hilman <khilman@baylibre.com>
Mon, 22 Aug 2016 12:47:55 +0000 (05:47 -0700)
Remove unneeded error handling on the result of a call
to platform_get_resource() when the value is passed to
devm_ioremap_resource().

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
drivers/mmc/host/meson-gxbb.c

index 10eac41cf31a155a479565fa159bf8115d791fde..96cd8830a124669a99996f626699dc2229f26e14 100644 (file)
@@ -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);
This page took 0.02578 seconds and 5 git commands to generate.