aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/matrox/matroxfb_crtc2.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2007-02-12 00:55:07 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 09:48:42 -0800
commit2fdbe5cf27aff997e348c5f01b424ad734bd1d25 (patch)
tree9e3e826c47a4d55ea1d3f53eadfda83121d95349 /drivers/video/matrox/matroxfb_crtc2.c
parentc30660ead2dd6ced47ac6ad4c099fb9305263ffb (diff)
[PATCH] matroxfb: Use kzalloc
Use kzalloc instead of kmalloc+memset, twice. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Petr Vandrovec <vandrove@vc.cvut.cz> Acked-By: James Simmons <jsimmons@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/matrox/matroxfb_crtc2.c')
-rw-r--r--drivers/video/matrox/matroxfb_crtc2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/video/matrox/matroxfb_crtc2.c b/drivers/video/matrox/matroxfb_crtc2.c
index 2c9801090fa..03ae55b168f 100644
--- a/drivers/video/matrox/matroxfb_crtc2.c
+++ b/drivers/video/matrox/matroxfb_crtc2.c
@@ -694,12 +694,11 @@ static void* matroxfb_crtc2_probe(struct matrox_fb_info* minfo) {
/* hardware is CRTC2 incapable... */
if (!ACCESS_FBINFO(devflags.crtc2))
return NULL;
- m2info = kmalloc(sizeof(*m2info), GFP_KERNEL);
+ m2info = kzalloc(sizeof(*m2info), GFP_KERNEL);
if (!m2info) {
printk(KERN_ERR "matroxfb_crtc2: Not enough memory for CRTC2 control structs\n");
return NULL;
}
- memset(m2info, 0, sizeof(*m2info));
m2info->primary_dev = MINFO;
if (matroxfb_dh_registerfb(m2info)) {
kfree(m2info);