Skip to content

Commit

Permalink
fbtft: set videomem size after platform data has been inspected
Browse files Browse the repository at this point in the history
  • Loading branch information
notro committed Nov 4, 2014
1 parent 4854507 commit fcc562e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fbtft-core.c
Expand Up @@ -714,8 +714,6 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
if (!bpp)
bpp = 16;

vmem_size = display->width*display->height*bpp/8;

if (!pdata) {
dev_err(dev, "platform data is missing\n");
return NULL;
Expand Down Expand Up @@ -755,6 +753,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
height = display->height;
}

vmem_size = display->width * display->height * bpp / 8;
vmem = vzalloc(vmem_size);
if (!vmem)
goto alloc_fail;
Expand Down

0 comments on commit fcc562e

Please sign in to comment.