diff options
Diffstat (limited to 'drivers/video/vgastate.c')
-rw-r--r-- | drivers/video/vgastate.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/vgastate.c b/drivers/video/vgastate.c index d9e01daee630..15179ec62339 100644 --- a/drivers/video/vgastate.c +++ b/drivers/video/vgastate.c | |||
@@ -356,10 +356,11 @@ int save_vga(struct vgastate *state) | |||
356 | { | 356 | { |
357 | struct regstate *saved; | 357 | struct regstate *saved; |
358 | 358 | ||
359 | saved = kmalloc(sizeof(struct regstate), GFP_KERNEL); | 359 | saved = kzalloc(sizeof(struct regstate), GFP_KERNEL); |
360 | |||
360 | if (saved == NULL) | 361 | if (saved == NULL) |
361 | return 1; | 362 | return 1; |
362 | memset (saved, 0, sizeof(struct regstate)); | 363 | |
363 | state->vidstate = (void *)saved; | 364 | state->vidstate = (void *)saved; |
364 | 365 | ||
365 | if (state->flags & VGA_SAVE_CMAP) { | 366 | if (state->flags & VGA_SAVE_CMAP) { |