projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
epson1355fb.c: fix error handling code
[powerpc.git]
/
drivers
/
video
/
vgastate.c
diff --git
a/drivers/video/vgastate.c
b/drivers/video/vgastate.c
index
d9e01da
..
d94efaf
100644
(file)
--- a/
drivers/video/vgastate.c
+++ b/
drivers/video/vgastate.c
@@
-13,7
+13,6
@@
* archive for more details.
*
*/
* archive for more details.
*
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/fb.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/fb.h>
@@
-356,10
+355,11
@@
int save_vga(struct vgastate *state)
{
struct regstate *saved;
{
struct regstate *saved;
- saved = kmalloc(sizeof(struct regstate), GFP_KERNEL);
+ saved = kzalloc(sizeof(struct regstate), GFP_KERNEL);
+
if (saved == NULL)
return 1;
if (saved == NULL)
return 1;
- memset (saved, 0, sizeof(struct regstate));
+
state->vidstate = (void *)saved;
if (state->flags & VGA_SAVE_CMAP) {
state->vidstate = (void *)saved;
if (state->flags & VGA_SAVE_CMAP) {