diff options
author | Joe Perches <joe@perches.com> | 2011-05-28 13:36:21 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-09-15 07:55:02 -0400 |
commit | dc8a5c9935d8e63123fab0d0033f15819351d0bf (patch) | |
tree | 55c4f69ea8901602b798c66363ca596bf4f92fbf | |
parent | 81d66c70b546e7be5d7e1f1ca9676fd17c5973af (diff) |
s390: Convert vmalloc/memset to vzalloc
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | arch/s390/hypfs/hypfs_diag.c | 3 | ||||
-rw-r--r-- | drivers/s390/cio/blacklist.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c index 6023c6dc1fb7..74c8f5e76ce4 100644 --- a/arch/s390/hypfs/hypfs_diag.c +++ b/arch/s390/hypfs/hypfs_diag.c | |||
@@ -562,10 +562,9 @@ static int dbfs_d204_create(void **data, void **data_free_ptr, size_t *size) | |||
562 | void *base; | 562 | void *base; |
563 | 563 | ||
564 | buf_size = PAGE_SIZE * (diag204_buf_pages + 1) + sizeof(d204->hdr); | 564 | buf_size = PAGE_SIZE * (diag204_buf_pages + 1) + sizeof(d204->hdr); |
565 | base = vmalloc(buf_size); | 565 | base = vzalloc(buf_size); |
566 | if (!base) | 566 | if (!base) |
567 | return -ENOMEM; | 567 | return -ENOMEM; |
568 | memset(base, 0, buf_size); | ||
569 | d204 = page_align_ptr(base + sizeof(d204->hdr)) - sizeof(d204->hdr); | 568 | d204 = page_align_ptr(base + sizeof(d204->hdr)) - sizeof(d204->hdr); |
570 | rc = diag204_do_store(d204->buf, diag204_buf_pages); | 569 | rc = diag204_do_store(d204->buf, diag204_buf_pages); |
571 | if (rc) { | 570 | if (rc) { |
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c index 76058a5166ed..08c66035dd19 100644 --- a/drivers/s390/cio/blacklist.c +++ b/drivers/s390/cio/blacklist.c | |||
@@ -335,10 +335,9 @@ cio_ignore_write(struct file *file, const char __user *user_buf, | |||
335 | return -EINVAL; | 335 | return -EINVAL; |
336 | if (user_len > 65536) | 336 | if (user_len > 65536) |
337 | user_len = 65536; | 337 | user_len = 65536; |
338 | buf = vmalloc (user_len + 1); /* maybe better use the stack? */ | 338 | buf = vzalloc(user_len + 1); /* maybe better use the stack? */ |
339 | if (buf == NULL) | 339 | if (buf == NULL) |
340 | return -ENOMEM; | 340 | return -ENOMEM; |
341 | memset(buf, 0, user_len + 1); | ||
342 | 341 | ||
343 | if (strncpy_from_user (buf, user_buf, user_len) < 0) { | 342 | if (strncpy_from_user (buf, user_buf, user_len) < 0) { |
344 | rc = -EFAULT; | 343 | rc = -EFAULT; |