summaryrefslogtreecommitdiffstats
path: root/drivers/video/controlfb.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2007-02-12 00:55:12 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 09:48:43 -0800
commitf5610b9c3a2896fcaa623b92d0f24d83f10bb2c0 (patch)
treef4ff35f5991debf0f892794687abc574cdaacb4f /drivers/video/controlfb.c
parentc4f28e54d61278203c2bb2aea0679e0a738235d2 (diff)
downloadlinux-f5610b9c3a2896fcaa623b92d0f24d83f10bb2c0.tar.gz
linux-f5610b9c3a2896fcaa623b92d0f24d83f10bb2c0.tar.bz2
linux-f5610b9c3a2896fcaa623b92d0f24d83f10bb2c0.zip
[PATCH] Video: fb, kzalloc changes
Use kzalloc instead of kmalloc + memset(0). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: James Simmons <jsimmons@infradead.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/controlfb.c')
-rw-r--r--drivers/video/controlfb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c
index 04c6d928189b..fd60dba294da 100644
--- a/drivers/video/controlfb.c
+++ b/drivers/video/controlfb.c
@@ -696,11 +696,10 @@ static int __init control_of_init(struct device_node *dp)
printk(KERN_ERR "can't get 2 addresses for control\n");
return -ENXIO;
}
- p = kmalloc(sizeof(*p), GFP_KERNEL);
+ p = kzalloc(sizeof(*p), GFP_KERNEL);
if (p == 0)
return -ENXIO;
control_fb = p; /* save it for cleanups */
- memset(p, 0, sizeof(*p));
/* Map in frame buffer and registers */
p->fb_orig_base = fb_res.start;