From 2fdbe5cf27aff997e348c5f01b424ad734bd1d25 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 12 Feb 2007 00:55:07 -0800 Subject: [PATCH] matroxfb: Use kzalloc Use kzalloc instead of kmalloc+memset, twice. Signed-off-by: Jean Delvare Cc: Petr Vandrovec Acked-By: James Simmons Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/matrox/matroxfb_crtc2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/video/matrox/matroxfb_crtc2.c') diff --git a/drivers/video/matrox/matroxfb_crtc2.c b/drivers/video/matrox/matroxfb_crtc2.c index 2c9801090fae..03ae55b168ff 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); -- cgit v1.2.3