X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fs390%2Fchar%2Ftty3270.c;h=4b90693703881fc61c517fdb36ce5c724774e222;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=9a141776873fc42de018fb59f1cb8a681819a6e5;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index 9a1417768..4b9069370 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c @@ -691,9 +691,10 @@ tty3270_alloc_view(void) struct tty3270 *tp; int pages; - tp = kzalloc(sizeof(struct tty3270), GFP_KERNEL); + tp = kmalloc(sizeof(struct tty3270),GFP_KERNEL); if (!tp) goto out_err; + memset(tp, 0, sizeof(struct tty3270)); tp->freemem_pages = kmalloc(sizeof(void *) * TTY3270_STRING_PAGES, GFP_KERNEL); if (!tp->freemem_pages) @@ -766,14 +767,16 @@ tty3270_alloc_screen(struct tty3270 *tp) int lines; size = sizeof(struct tty3270_line) * (tp->view.rows - 2); - tp->screen = kzalloc(size, GFP_KERNEL); + tp->screen = kmalloc(size, GFP_KERNEL); if (!tp->screen) goto out_err; + memset(tp->screen, 0, size); for (lines = 0; lines < tp->view.rows - 2; lines++) { size = sizeof(struct tty3270_cell) * tp->view.cols; - tp->screen[lines].cells = kzalloc(size, GFP_KERNEL); + tp->screen[lines].cells = kmalloc(size, GFP_KERNEL); if (!tp->screen[lines].cells) goto out_screen; + memset(tp->screen[lines].cells, 0, size); } return 0; out_screen: