Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2395791ybi; Thu, 18 Jul 2019 07:46:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2uBIZ/Kj5v6rE3kCB9fXoxO7eas/Tm9Fq1osg053i05HG1Hkp6AIt5cN4oNFA0tjMjexm X-Received: by 2002:a65:5cca:: with SMTP id b10mr49153424pgt.365.1563461198327; Thu, 18 Jul 2019 07:46:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563461198; cv=none; d=google.com; s=arc-20160816; b=b3Px969kuzSODGCN90WXxK86H4anV6Rz8umJlbjDlLFC2UmOsy7360mvAnYGuk0kpK 9nsTpFAbYVUIwh/elLQCKVIzAPxORu6xeFr1eK24h82vqOQyXzPuRslBrl3O8OyqXyxK xjrIVtzmyhHyzyaZpNyJ/a4B2N3UP9a9byFOXVruHQusrBxqpQdefYKi2NexqRLv337p Vd+oN69ZHm+hZvpCdKJF6q52dD7xzTuPd2uLKxeKH28Jq1UykdpheAmQiLrHa/WJ5L6S JbCyzPxvdLDabWy9Whnh/4SZxK27kAQIw6Ea1f7kJTOarshnlFysKhEbf8exh8SInBH5 ey3Q== 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=bMCLaKg7GRv6BP8YoqNHli6vGhfsjLZpt35V5zMvjvI=; b=gTSjQbugs3qzAIgToPbMGeCj+q15t9mhMSvqbRH7cU18g2LOTOm3aXY6EHyylRogoZ giCi2g9CsIKj0E74GlYmQTsf2ZjmZexRKs9AUaFh8JW8DfNw7I9v/0mlG448SKr9m9AD 3QY5swnfn/Mq6Abd6WovCB7EtfEkUHvN7FP1dDTRRilWZSORcotSJ2B5mOpM9iwUIYYF mZqn0098wgkNSs8+dnHIwqNXVgtLfERr5ZXY9zMypU2eidNSKfmUue+bFC5hf5Ja1nZg g/q25rn4B0ruxT04u9T3RtfoaBvsfTDoGOZPTQzMmrdWFlmSPUjf6LKysa2QNr1R3xQ2 FsSg== 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 l184si1472043pge.286.2019.07.18.07.46.24; Thu, 18 Jul 2019 07:46:38 -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 S2390813AbfGROp6 (ORCPT + 99 others); Thu, 18 Jul 2019 10:45:58 -0400 Received: from inva021.nxp.com ([92.121.34.21]:40228 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390707AbfGROpn (ORCPT ); Thu, 18 Jul 2019 10:45:43 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 257E72001A9; Thu, 18 Jul 2019 16:45:42 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1913420011A; Thu, 18 Jul 2019 16:45:42 +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 BA56C205C7; Thu, 18 Jul 2019 16:45: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 14/14] crypto: caam - change return value in case CAAM has no MDHA Date: Thu, 18 Jul 2019 17:45:24 +0300 Message-Id: <1563461124-24641-15-git-send-email-iuliana.prodan@nxp.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1563461124-24641-1-git-send-email-iuliana.prodan@nxp.com> References: <1563461124-24641-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 --- 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 e89913b..d4e047f 100644 --- a/drivers/crypto/caam/caamhash.c +++ b/drivers/crypto/caam/caamhash.c @@ -2008,7 +2008,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