diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 5861ba2c2a20..91269f6eab8d 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -881,12 +881,6 @@ static int mxsfb_probe(struct platform_device *pdev) if (of_id) pdev->id_entry = of_id->data; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(&pdev->dev, "Cannot get memory IO resource\n"); - return -ENODEV; - } - fb_info = framebuffer_alloc(sizeof(struct mxsfb_info), &pdev->dev); if (!fb_info) { dev_err(&pdev->dev, "Failed to allocate fbdev\n"); @@ -895,6 +889,7 @@ static int mxsfb_probe(struct platform_device *pdev) host = to_imxfb_host(fb_info); + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); host->base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(host->base)) { ret = PTR_ERR(host->base);