From def1ededb7bfefc8678b4c7251622f7cbe65af94 Mon Sep 17 00:00:00 2001 From: "Antonino A. Daplas" Date: Mon, 9 Jan 2006 20:53:45 -0800 Subject: [PATCH] fbdev: Replace kmalloc with kzalloc Replace kmalloc with kzalloc Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/vgastate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/video/vgastate.c') 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) { struct regstate *saved; - saved = kmalloc(sizeof(struct regstate), GFP_KERNEL); + saved = kzalloc(sizeof(struct regstate), GFP_KERNEL); + if (saved == NULL) return 1; - memset (saved, 0, sizeof(struct regstate)); + state->vidstate = (void *)saved; if (state->flags & VGA_SAVE_CMAP) { -- cgit v1.2.3