drm/stm: ltdc: Remove unnecessary platform_get_resource() error check
authorFabio Estevam <fabio.estevam@nxp.com>
Mon, 18 Dec 2017 13:02:29 +0000 (11:02 -0200)
committerBenjamin Gaignard <benjamin.gaignard@linaro.org>
Tue, 19 Dec 2017 14:23:45 +0000 (15:23 +0100)
devm_ioremap_resource() already checks if the resource is NULL, so
remove the unnecessary platform_get_resource() error check.

Cc: Philippe Cornu <philippe.cornu@st.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Philippe Cornu <philippe.cornu@st.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1513602150-7542-6-git-send-email-festevam@gmail.com
drivers/gpu/drm/stm/ltdc.c

index 394613b..6dc5d4e 100644 (file)
@@ -901,12 +901,6 @@ int ltdc_load(struct drm_device *ddev)
        }
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res) {
-               DRM_ERROR("Unable to get resource\n");
-               ret = -ENODEV;
-               goto err;
-       }
-
        ldev->regs = devm_ioremap_resource(dev, res);
        if (IS_ERR(ldev->regs)) {
                DRM_ERROR("Unable to get ltdc registers\n");