summaryrefslogtreecommitdiffstats
path: root/drivers/video/matrox/i2c-matroxfb.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/i2c-matroxfb.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/i2c-matroxfb.c')
-rw-r--r--drivers/video/matrox/i2c-matroxfb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/video/matrox/i2c-matroxfb.c b/drivers/video/matrox/i2c-matroxfb.c
index fe28848e7b5..f64c4a0984c 100644
--- a/drivers/video/matrox/i2c-matroxfb.c
+++ b/drivers/video/matrox/i2c-matroxfb.c
@@ -146,7 +146,7 @@ static void* i2c_matroxfb_probe(struct matrox_fb_info* minfo) {
unsigned long flags;
struct matroxfb_dh_maven_info* m2info;
- m2info = kmalloc(sizeof(*m2info), GFP_KERNEL);
+ m2info = kzalloc(sizeof(*m2info), GFP_KERNEL);
if (!m2info)
return NULL;
@@ -155,8 +155,6 @@ static void* i2c_matroxfb_probe(struct matrox_fb_info* minfo) {
matroxfb_DAC_out(PMINFO DAC_XGENIOCTRL, 0x00);
matroxfb_DAC_unlock_irqrestore(flags);
- memset(m2info, 0, sizeof(*m2info));
-
switch (ACCESS_FBINFO(chip)) {
case MGA_2064:
case MGA_2164: