Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10943247ybi; Thu, 25 Jul 2019 07:24:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqyC4aVOyGCsK6VKkHx7nBMR1R+CBYaxIhz1wsVB/wTjeLBZJCqAgmEeGStCL9wPezlD/WOm X-Received: by 2002:a62:754d:: with SMTP id q74mr16496151pfc.211.1564064695521; Thu, 25 Jul 2019 07:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564064695; cv=none; d=google.com; s=arc-20160816; b=N1/byWILZBK4P2qaMpjfuJVqToGrbkLU6FEfJKk5Mr2yFxVg9uAEIxSN2HDBiiOgHa /TisjIi8eu49V3+nFoHDMiqZtsVH16e3WXk/bLQaaHopvBYs74DzJGyoefMFtfUpVjyE hqDAI/7rBxPxbtVVHEIxYBX6MBFdyPl0jruOwePFgDuzmgNAE6fyfdzb3OGI3T2sO/fh rNJTm+baAzC5NBzrt+G+QD41KixIyBqDOTjY8RQdgh8HubcAw1lmNQMaU/MluyxNHUlw DiTrmi4b9czM8Rb97YcAqi/4XOHBzryTin7EopklzxBADsb2HIavkpA/1J7rIXO/Dn39 f2nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=HFe0dRyIfSVoqZ/xl1JxMV3ER4vhHWw3OrOrDjNrMis=; b=A7deBoeI6/kaF0bE+uJ+hVwzrjlTEnH0fixCY4sk0t/qnDv1HueX8QuGI9Qm3qavuA GvSW7Ql0eIlRGjyfHAGhUjPKixB1N97oUd55lmqX+3fJBTnvnP4hn9vlbiAmEQWXZ0v4 aoW5HSSJdxeE3AVFi0kqpwFmSpNcnFfkxJoDdfDTXJ3Fu1LMH/cHX5xHe/5HTcz6BBmK FsK72Lj8l/WSJ4TbT81SLi/8+WSXcO12a0se2/UJpfBk7HecmQV6qPxPOm4WMNUTBOEY Doct5ClWRHNZ3m1gfbPcq/hSFV4y3KzAPJCmAryxfqldj6zNZ78uuby1LENjnG+zKm8h wvPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p7si15313903plo.114.2019.07.25.07.24.42; Thu, 25 Jul 2019 07:24:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728865AbfGYN6n (ORCPT + 99 others); Thu, 25 Jul 2019 09:58:43 -0400 Received: from inva020.nxp.com ([92.121.34.13]:49066 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728459AbfGYN6n (ORCPT ); Thu, 25 Jul 2019 09:58:43 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id EF1EA1A071B; Thu, 25 Jul 2019 15:58:41 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E35C71A0709; Thu, 25 Jul 2019 15:58:41 +0200 (CEST) Received: from lorenz.ea.freescale.net (lorenz.ea.freescale.net [10.171.71.5]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 8CEB6205EE; Thu, 25 Jul 2019 15:58:41 +0200 (CEST) From: Iuliana Prodan To: Herbert Xu , Horia Geanta , Aymen Sghaier Cc: "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx Subject: [PATCH v3 14/14] crypto: caam - change return value in case CAAM has no MDHA Date: Thu, 25 Jul 2019 16:58:26 +0300 Message-Id: <1564063106-9552-15-git-send-email-iuliana.prodan@nxp.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1564063106-9552-1-git-send-email-iuliana.prodan@nxp.com> References: <1564063106-9552-1-git-send-email-iuliana.prodan@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org To be consistent with other CAAM modules, caamhash should return 0 instead of -ENODEV in case CAAM has no MDHA. Based on commit 1b46c90c8e00 ("crypto: caam - convert top level drivers to libraries") the value returned by entry point is never checked and the exit point is always executed. Signed-off-by: Iuliana Prodan Reviewed-by: Horia Geanta --- drivers/crypto/caam/caamhash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c index 7147190..3a1dfd2 100644 --- a/drivers/crypto/caam/caamhash.c +++ b/drivers/crypto/caam/caamhash.c @@ -2007,7 +2007,7 @@ int caam_algapi_hash_init(struct device *ctrldev) * is not present. */ if (!md_inst) - return -ENODEV; + return 0; /* Limit digest size based on LP256 */ if (md_vid == CHA_VER_VID_MD_LP256) -- 2.1.0