Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp254011yba; Mon, 1 Apr 2019 05:55:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/pPNS2qTrEzdE4deieo5ynmOdqCT8JRsofxRnyqfOZBLqtZr0ckYmW8PfNqLgiAMCby3A X-Received: by 2002:a17:902:59c5:: with SMTP id d5mr30798797plj.104.1554123356988; Mon, 01 Apr 2019 05:55:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554123356; cv=none; d=google.com; s=arc-20160816; b=lroU6lp+/jUwr23fMKM5jxWDQdcoPxMyTPCdgabKefspX6j1fbbGI1YDKns7BkRjzp qcVxHMlZPq64XdqVF1eo848eakwU6YNIzpHZhRW7B5hLwyMDl/+ldQhrP2qlcEGF4r1W Z4ICY4PHK6vXOGVy4p0d2SL3DE7G27IIy1M9sZI++Ye3YcKZh7duItL2glgGLGbtt/me WXQCU650ySuH9GjQD5O/C0Xus4hzZvo0+ZEYFuabZhxUSeKxrq6eeeMcte7ruETiLrma hfD9BLqHxa6gvm+LM7DTt/5U/KFgyBGKQULf1799j138ZURh9FMR6tmj3kHoVjawigtK VIOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=V11SKIdjJjVgzjLm2j1ZQ1vHZyg626sX6LMX+tI3gZs=; b=H/G1ixMAwQAvm5efpU4oRLbpyVeBvx4xKsWAXcps6W0/X2B82+3EMHI3gZ0FPQpfhe QecKImzUa7VC/bH+q68rGSl9NY6nSCwotVARRME5uxYO8MNyVLynk5VNVvFg7E7sTS/T j7TyfzuxKQn0skwHUS4GqUt20SZAp65O+0sSK2PK31nU5Za46UqetSIrykagDnmRXmE8 INjCK+PWkYP2syuvZADnTVGB+CnkGt1w8eTH+es/MaV17oJVGJg9/01RY2LW5RzP4olE Qgbovx4CbpGEPCF1HAOQ4JOsO1BfKrcGCLygFFX2tvI7tpGyL8UcSBoS1C3MAOnA2v/K Mtug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o11si8644707pgv.13.2019.04.01.05.55.41; Mon, 01 Apr 2019 05:55:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726895AbfDAMyr (ORCPT + 99 others); Mon, 1 Apr 2019 08:54:47 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:46911 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725882AbfDAMyr (ORCPT ); Mon, 1 Apr 2019 08:54:47 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x31CpA2n030648; Mon, 1 Apr 2019 14:54:26 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2rjee285pb-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 01 Apr 2019 14:54:26 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C16CE38; Mon, 1 Apr 2019 12:54:25 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 640A0290A; Mon, 1 Apr 2019 12:54:25 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.435.0; Mon, 1 Apr 2019 14:54:25 +0200 Received: from localhost (10.201.23.65) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.435.0; Mon, 1 Apr 2019 14:54:25 +0200 From: Lionel Debieve To: Herbert Xu , "David S . Miller" , Maxime Coquelin , "Alexandre Torgue" , , , CC: Benjamin Gaignard , Fabien Dessenne , Ludovic Barre , Subject: [PATCH 1/1] crypto: testmgr - call shash_init in crc32c algo Date: Mon, 1 Apr 2019 14:54:24 +0200 Message-ID: <1554123264-24243-1-git-send-email-lionel.debieve@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.201.23.65] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-01_05:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In case of device call required in low level driver, the context must be initialized before calling the final function. Signed-off-by: Lionel Debieve --- crypto/testmgr.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 8386038..4a00d7c 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -2181,6 +2181,13 @@ static int alg_test_crc32c(const struct alg_test_desc *desc, shash->tfm = tfm; shash->flags = 0; + err = crypto_shash_init(shash); + if (err) { + printk(KERN_ERR "alg: crc32c: init failed for " + "%s: %d\n", driver, err); + break; + } + *ctx = 420553207; err = crypto_shash_final(shash, (u8 *)&val); if (err) { -- 2.7.4