From patchwork Mon Mar 30 21:25:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tadeusz Struk X-Patchwork-Id: 6125501 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 574529F32E for ; Mon, 30 Mar 2015 21:28:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 845892041F for ; Mon, 30 Mar 2015 21:28:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 934C12042A for ; Mon, 30 Mar 2015 21:28:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753474AbbC3V2j (ORCPT ); Mon, 30 Mar 2015 17:28:39 -0400 Received: from mga02.intel.com ([134.134.136.20]:16482 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753449AbbC3V2c (ORCPT ); Mon, 30 Mar 2015 17:28:32 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 30 Mar 2015 14:28:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,496,1422950400"; d="scan'208";a="474621024" Received: from tstruk-mobl1.intel.com (HELO [127.0.1.1]) ([134.134.171.95]) by FMSMGA003.fm.intel.com with ESMTP; 30 Mar 2015 14:28:31 -0700 Subject: [PATCH net-next] crypto: algif - use kmalloc instead of kzalloc To: davem@davemloft.net From: Tadeusz Struk Cc: netdev@vger.kernel.org, linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au Date: Mon, 30 Mar 2015 14:25:44 -0700 Message-ID: <20150330212543.7179.25983.stgit@tstruk-mobl1> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP No need to use kzalloc to allocate sgls as the structure is initialized anyway. Signed-off-by: Tadeusz Struk --- crypto/algif_skcipher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index 9492dd5..5fd631f 100644 --- a/crypto/algif_skcipher.c +++ b/crypto/algif_skcipher.c @@ -583,7 +583,7 @@ static int skcipher_recvmsg_async(struct socket *sock, struct msghdr *msg, rsgl = &sreq->first_sgl; list_add_tail(&rsgl->list, &sreq->list); } else { - rsgl = kzalloc(sizeof(*rsgl), GFP_KERNEL); + rsgl = kmalloc(sizeof(*rsgl), GFP_KERNEL); if (!rsgl) { err = -ENOMEM; goto free;