From patchwork Mon Jul 4 09:52:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salvatore Benedetto X-Patchwork-Id: 9212141 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B1F926048B for ; Mon, 4 Jul 2016 09:53:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A27D827B16 for ; Mon, 4 Jul 2016 09:53:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 974AD284A9; Mon, 4 Jul 2016 09:53:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16CBC2840A for ; Mon, 4 Jul 2016 09:53:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932704AbcGDJwp (ORCPT ); Mon, 4 Jul 2016 05:52:45 -0400 Received: from mga04.intel.com ([192.55.52.120]:14700 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932691AbcGDJwn (ORCPT ); Mon, 4 Jul 2016 05:52:43 -0400 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP; 04 Jul 2016 02:52:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,574,1459839600"; d="scan'208";a="840251799" Received: from sie-lab-213-110.ir.intel.com (HELO silpixa00389043.ir.intel.com) ([10.237.213.110]) by orsmga003.jf.intel.com with ESMTP; 04 Jul 2016 02:52:36 -0700 From: Salvatore Benedetto To: herbert@gondor.apana.org.au Cc: salvatore.benedetto@intel.com, linux-crypto@vger.kernel.org Subject: [PATCH] crypto: testmgr - Set err before proceeding Date: Mon, 4 Jul 2016 10:52:34 +0100 Message-Id: <1467625954-2707-1-git-send-email-salvatore.benedetto@intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Report correct error in case of failure Signed-off-by: Salvatore Benedetto --- crypto/testmgr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 8ea0d3f..769cc2a 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -1941,6 +1941,7 @@ static int test_akcipher_one(struct crypto_akcipher *tfm, if (err) goto free_req; + err = -ENOMEM; out_len_max = crypto_akcipher_maxsize(tfm); outbuf_enc = kzalloc(out_len_max, GFP_KERNEL); if (!outbuf_enc)