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/i2c-matroxfb.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/i2c-matroxfb.c')
-rw-r--r-- | drivers/video/matrox/i2c-matroxfb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/video/matrox/i2c-matroxfb.c b/drivers/video/matrox/i2c-matroxfb.c index fe28848e7b52..f64c4a0984cd 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) { | |||
146 | unsigned long flags; | 146 | unsigned long flags; |
147 | struct matroxfb_dh_maven_info* m2info; | 147 | struct matroxfb_dh_maven_info* m2info; |
148 | 148 | ||
149 | m2info = kmalloc(sizeof(*m2info), GFP_KERNEL); | 149 | m2info = kzalloc(sizeof(*m2info), GFP_KERNEL); |
150 | if (!m2info) | 150 | if (!m2info) |
151 | return NULL; | 151 | return NULL; |
152 | 152 | ||
@@ -155,8 +155,6 @@ static void* i2c_matroxfb_probe(struct matrox_fb_info* minfo) { | |||
155 | matroxfb_DAC_out(PMINFO DAC_XGENIOCTRL, 0x00); | 155 | matroxfb_DAC_out(PMINFO DAC_XGENIOCTRL, 0x00); |
156 | matroxfb_DAC_unlock_irqrestore(flags); | 156 | matroxfb_DAC_unlock_irqrestore(flags); |
157 | 157 | ||
158 | memset(m2info, 0, sizeof(*m2info)); | ||
159 | |||
160 | switch (ACCESS_FBINFO(chip)) { | 158 | switch (ACCESS_FBINFO(chip)) { |
161 | case MGA_2064: | 159 | case MGA_2064: |
162 | case MGA_2164: | 160 | case MGA_2164: |