drm/rockchip: inno_hdmi: Remove unnecessary platform_get_resource() error check
authorFabio Estevam <fabio.estevam@nxp.com>
Mon, 18 Dec 2017 13:02:27 +0000 (11:02 -0200)
committerHeiko Stuebner <heiko@sntech.de>
Sun, 18 Feb 2018 10:15:29 +0000 (11:15 +0100)
devm_ioremap_resource() already checks if the resource is NULL, so
remove the unnecessary platform_get_resource() error check.

Cc: Heiko Stübner <heiko@sntech.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/1513602150-7542-4-git-send-email-festevam@gmail.com
drivers/gpu/drm/rockchip/inno_hdmi.c

index fab30927a8894862ccab9ebca92be72945220612..f6ad48766d49815084130a4ee7ebf41d250f42a3 100644 (file)
@@ -831,9 +831,6 @@ static int inno_hdmi_bind(struct device *dev, struct device *master,
        hdmi->drm_dev = drm;
 
        iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!iores)
-               return -ENXIO;
-
        hdmi->regs = devm_ioremap_resource(dev, iores);
        if (IS_ERR(hdmi->regs))
                return PTR_ERR(hdmi->regs);