[media] coda: No need to check the return value of platform_get_resource()
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 21 Aug 2013 14:14:18 +0000 (11:14 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sat, 24 Aug 2013 07:06:26 +0000 (04:06 -0300)
When using devm_ioremap_resource(), we do not need to check the return value of
platform_get_resource(), so just remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/coda.c

index 04ced56d58f25e2ddc06e2462066fc75e1ca7945..999f9dc0e106ab8f4fb79220008f5521a573ac79 100644 (file)
@@ -3154,11 +3154,6 @@ static int coda_probe(struct platform_device *pdev)
 
        /* Get  memory for physical registers */
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (res == NULL) {
-               dev_err(&pdev->dev, "failed to get memory region resource\n");
-               return -ENOENT;
-       }
-
        dev->regs_base = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(dev->regs_base))
                return PTR_ERR(dev->regs_base);