diff options
Diffstat (limited to 'drivers/misc/ibmasm/ibmasmfs.c')
-rw-r--r-- | drivers/misc/ibmasm/ibmasmfs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c index eb7b073734b8..22a7e8ba211d 100644 --- a/drivers/misc/ibmasm/ibmasmfs.c +++ b/drivers/misc/ibmasm/ibmasmfs.c | |||
@@ -563,11 +563,10 @@ static ssize_t remote_settings_file_write(struct file *file, const char __user * | |||
563 | if (*offset != 0) | 563 | if (*offset != 0) |
564 | return 0; | 564 | return 0; |
565 | 565 | ||
566 | buff = kmalloc (count + 1, GFP_KERNEL); | 566 | buff = kzalloc (count + 1, GFP_KERNEL); |
567 | if (!buff) | 567 | if (!buff) |
568 | return -ENOMEM; | 568 | return -ENOMEM; |
569 | 569 | ||
570 | memset(buff, 0x0, count + 1); | ||
571 | 570 | ||
572 | if (copy_from_user(buff, ubuff, count)) { | 571 | if (copy_from_user(buff, ubuff, count)) { |
573 | kfree(buff); | 572 | kfree(buff); |