From: Nicholas Mc Guire Date: Tue, 22 Dec 2015 16:13:50 +0000 (+0100) Subject: Orangefs: use kzalloc for kmalloc + memset 0 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dde58ca4367a216d51c4e034f1f0195e5923c934;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Orangefs: use kzalloc for kmalloc + memset 0 This is an API consolidation only. The use of kmalloc + memset to 0 should be equivalent to kzalloc in this case. Signed-off-by: Nicholas Mc Guire Signed-off-by: Mike Marshall --- diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c index 7319f1a2ecb8..9eb7972ae10d 100644 --- a/fs/orangefs/orangefs-debugfs.c +++ b/fs/orangefs/orangefs-debugfs.c @@ -365,10 +365,9 @@ static ssize_t orangefs_debug_write(struct file *file, count = ORANGEFS_MAX_DEBUG_STRING_LEN + 1; } - buf = kmalloc(ORANGEFS_MAX_DEBUG_STRING_LEN, GFP_KERNEL); + buf = kzalloc(ORANGEFS_MAX_DEBUG_STRING_LEN, GFP_KERNEL); if (!buf) goto out; - memset(buf, 0, ORANGEFS_MAX_DEBUG_STRING_LEN); if (copy_from_user(buf, ubuf, count - 1)) { gossip_debug(GOSSIP_DEBUGFS_DEBUG,