diff options
author | Jean Delvare <khali@linux-fr.org> | 2007-02-12 03:55:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:42 -0500 |
commit | 2fdbe5cf27aff997e348c5f01b424ad734bd1d25 (patch) | |
tree | 9e3e826c47a4d55ea1d3f53eadfda83121d95349 /drivers/video/matrox/matroxfb_crtc2.c | |
parent | c30660ead2dd6ced47ac6ad4c099fb9305263ffb (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.c | 3 |
1 files changed, 1 insertions, 2 deletions
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) { | |||
694 | /* hardware is CRTC2 incapable... */ | 694 | /* hardware is CRTC2 incapable... */ |
695 | if (!ACCESS_FBINFO(devflags.crtc2)) | 695 | if (!ACCESS_FBINFO(devflags.crtc2)) |
696 | return NULL; | 696 | return NULL; |
697 | m2info = kmalloc(sizeof(*m2info), GFP_KERNEL); | 697 | m2info = kzalloc(sizeof(*m2info), GFP_KERNEL); |
698 | if (!m2info) { | 698 | if (!m2info) { |
699 | printk(KERN_ERR "matroxfb_crtc2: Not enough memory for CRTC2 control structs\n"); | 699 | printk(KERN_ERR "matroxfb_crtc2: Not enough memory for CRTC2 control structs\n"); |
700 | return NULL; | 700 | return NULL; |
701 | } | 701 | } |
702 | memset(m2info, 0, sizeof(*m2info)); | ||
703 | m2info->primary_dev = MINFO; | 702 | m2info->primary_dev = MINFO; |
704 | if (matroxfb_dh_registerfb(m2info)) { | 703 | if (matroxfb_dh_registerfb(m2info)) { |
705 | kfree(m2info); | 704 | kfree(m2info); |