diff options
Diffstat (limited to 'drivers/char/consolemap.c')
-rw-r--r-- | drivers/char/consolemap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/consolemap.c b/drivers/char/consolemap.c index 4b3916f54909..163f3fce3f84 100644 --- a/drivers/char/consolemap.c +++ b/drivers/char/consolemap.c | |||
@@ -494,12 +494,11 @@ int con_clear_unimap(struct vc_data *vc, struct unimapinit *ui) | |||
494 | p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc; | 494 | p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc; |
495 | if (p && p->readonly) return -EIO; | 495 | if (p && p->readonly) return -EIO; |
496 | if (!p || --p->refcount) { | 496 | if (!p || --p->refcount) { |
497 | q = kmalloc(sizeof(*p), GFP_KERNEL); | 497 | q = kzalloc(sizeof(*p), GFP_KERNEL); |
498 | if (!q) { | 498 | if (!q) { |
499 | if (p) p->refcount++; | 499 | if (p) p->refcount++; |
500 | return -ENOMEM; | 500 | return -ENOMEM; |
501 | } | 501 | } |
502 | memset(q, 0, sizeof(*q)); | ||
503 | q->refcount=1; | 502 | q->refcount=1; |
504 | *vc->vc_uni_pagedir_loc = (unsigned long)q; | 503 | *vc->vc_uni_pagedir_loc = (unsigned long)q; |
505 | } else { | 504 | } else { |