From: Dia Vasile Date: Sun, 10 Mar 2013 12:29:04 +0000 (+0200) Subject: cifs: replaced kmalloc + memset with kzalloc X-Git-Tag: v3.10-rc1~82^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d455b72bdd23a1d7adcbdfb5c1ceabcd7beaf853;p=platform%2Fupstream%2Fkernel-adaptation-pc.git cifs: replaced kmalloc + memset with kzalloc Signed-off-by: Diana Vasile Signed-off-by: Steve French Signed-off-by: Steve French --- diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 41d9d07..83ef66e 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -846,12 +846,10 @@ create_lease_buf(u8 *lease_key, u8 oplock) { struct create_lease *buf; - buf = kmalloc(sizeof(struct create_lease), GFP_KERNEL); + buf = kzalloc(sizeof(struct create_lease), GFP_KERNEL); if (!buf) return NULL; - memset(buf, 0, sizeof(struct create_lease)); - buf->lcontext.LeaseKeyLow = cpu_to_le64(*((u64 *)lease_key)); buf->lcontext.LeaseKeyHigh = cpu_to_le64(*((u64 *)(lease_key + 8))); if (oplock == SMB2_OPLOCK_LEVEL_EXCLUSIVE)