MLK-13684-1 video: mxsfb: correct the 'fb_info' alloc size
authorFancy Fang <chen.fang@nxp.com>
Mon, 26 Dec 2016 09:08:37 +0000 (17:08 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:58:16 +0000 (14:58 -0500)
The 'framebuffer_alloc()' will add the fb_info_size to the 'size'
parameter before doing the real allocation. So it is not necessary
to pass the sizeof(struct fb_info) to it again.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
drivers/video/fbdev/mxsfb.c

index 499b890..ff8c716 100644 (file)
@@ -1436,7 +1436,7 @@ static int mxsfb_probe(struct platform_device *pdev)
                return -ENOMEM;
        }
 
-       fb_info = framebuffer_alloc(sizeof(struct fb_info), &pdev->dev);
+       fb_info = framebuffer_alloc(0, &pdev->dev);
        if (!fb_info) {
                dev_err(&pdev->dev, "Failed to allocate fbdev\n");
                devm_kfree(&pdev->dev, host);