struct fb_image *image;
u8 *dst;
static u8 *src=NULL;
- static int allocsize=0;
+ static int allocsize = 0;
if (info->state != FBINFO_STATE_RUNNING)
return 0;
allocsize = dsize + sizeof(struct fb_image);
src = kmalloc(allocsize, GFP_ATOMIC);
- if (!src)
+ if (!src) {
+ allocsize = 0;
return -ENOMEM;
+ }
}
image = (struct fb_image *) (src + dsize);