diff options
Diffstat (limited to 'drivers/video/fbsysfs.c')
-rw-r--r-- | drivers/video/fbsysfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c index 35147030a3e8..6d26057337e2 100644 --- a/drivers/video/fbsysfs.c +++ b/drivers/video/fbsysfs.c | |||
@@ -43,10 +43,11 @@ struct fb_info *framebuffer_alloc(size_t size, struct device *dev) | |||
43 | if (size) | 43 | if (size) |
44 | fb_info_size += PADDING; | 44 | fb_info_size += PADDING; |
45 | 45 | ||
46 | p = kmalloc(fb_info_size + size, GFP_KERNEL); | 46 | p = kzalloc(fb_info_size + size, GFP_KERNEL); |
47 | |||
47 | if (!p) | 48 | if (!p) |
48 | return NULL; | 49 | return NULL; |
49 | memset(p, 0, fb_info_size + size); | 50 | |
50 | info = (struct fb_info *) p; | 51 | info = (struct fb_info *) p; |
51 | 52 | ||
52 | if (size) | 53 | if (size) |