diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2006-01-10 07:53:45 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 19:01:51 +0300 |
commit | def1ededb7bfefc8678b4c7251622f7cbe65af94 (patch) | |
tree | 4cd264f2ec5e05011db8412c22e0ac2d8dbbf32a /drivers/video/vgastate.c | |
parent | a39bc34ea8f042e090ade124726ae5a3fd1a51f8 (diff) | |
download | linux-def1ededb7bfefc8678b4c7251622f7cbe65af94.tar.xz |
[PATCH] fbdev: Replace kmalloc with kzalloc
Replace kmalloc with kzalloc
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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) { 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) { |