drm/exynos: decon5433: Remove unnecessary platform_get_resource() error check
authorFabio Estevam <fabio.estevam@nxp.com>
Mon, 18 Dec 2017 13:02:25 +0000 (11:02 -0200)
committerInki Dae <inki.dae@samsung.com>
Mon, 1 Jan 2018 23:36:39 +0000 (08:36 +0900)
devm_ioremap_resource() already checks if the resource is NULL, so
remove the unnecessary platform_get_resource() error check.

Cc: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos5433_drm_decon.c

index 6be5b53c3b279f42ee6dbcc445173fa539721ce5..1d509a815d6868a8f907f1b94ad91d3abc1052f3 100644 (file)
@@ -744,11 +744,6 @@ static int exynos5433_decon_probe(struct platform_device *pdev)
        }
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res) {
-               dev_err(dev, "cannot find IO resource\n");
-               return -ENXIO;
-       }
-
        ctx->addr = devm_ioremap_resource(dev, res);
        if (IS_ERR(ctx->addr)) {
                dev_err(dev, "ioremap failed\n");