Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2904489ybi; Thu, 18 Jul 2019 16:59:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfJY3+ZsnLbu00a0hCX1Yu8WQDAUTIqxzd8mjUDg36+8Xlz2lmsg+Vdw50Vfoj/KAx34ky X-Received: by 2002:a17:902:2be8:: with SMTP id l95mr48831156plb.231.1563494373279; Thu, 18 Jul 2019 16:59:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563494373; cv=none; d=google.com; s=arc-20160816; b=lRyNb3NdkZGQBqr0XZaotZISmPz6TPiw1KSXzwrbggJRGf9URqaMZ8T/UdCyQ3ovyP Iz67IOVBSKLjlg2oMjKkUhyiIlSm83d/LQIixBtDNTXucGGe+rAd674A/rYdXl5YH5qZ RyJRP2DBLwk8WWTOC1xsF9E4mWHYBgvOt859lFMqisUGTvgFDegfJXZgHT0jQLRMRtm5 X5mkNVzrVUyJwCAiGfOkEl+8uNSr2k8CiNAes8+29Uw/mnOcL4Gkvpn5Ezz79Fi1z+by XN5qe9uRO/2QSovyR/j0G4U+G6kg1BhfUP7QDRs4yiUH+jJGvNbdDChCVtyZ2FjsdG7P cRKg== 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=xWA6LCUnmgQsod0YfGaJMAdAyLzzZeCNkBTdGHzexSXJC4DADzeQDBd4h5u7KHLWBf L9I66yuQkZfvGBgZ8yL+3Lc89dJ/GEBeAyCVCQ1JqR5ABgtohHHsFgpLGvB2LQUHhKTc 3v/yXenfRCEwfBPFTYjQ4IWYdDnZL9GsxwJ25ITC7Vu6e4RHmH1pYOPLguYuYO2ekEYp OI61/Fditc999KjuE0jgqZdErag1W5Xqr+mhTEhHlylt+ajbFiCux527vCRlVkpwSqcv QTlcMBcmumTYf9UPag1cCnqf9fm18tuVLbqLrFxy2R7DjkyxaRNUskQ8iv6dvfDzgmsp qWLw== 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 w14si3864943pjn.15.2019.07.18.16.59.20; Thu, 18 Jul 2019 16:59:33 -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 S1726710AbfGRX6o (ORCPT + 99 others); Thu, 18 Jul 2019 19:58:44 -0400 Received: from inva021.nxp.com ([92.121.34.21]:53232 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726385AbfGRX6T (ORCPT ); Thu, 18 Jul 2019 19:58:19 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id AD6082003CB; Fri, 19 Jul 2019 01:58:17 +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 A07C6200003; Fri, 19 Jul 2019 01:58:17 +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 4DDEE205D1; Fri, 19 Jul 2019 01:58:17 +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 v2 14/14] crypto: caam - change return value in case CAAM has no MDHA Date: Fri, 19 Jul 2019 02:57:56 +0300 Message-Id: <1563494276-3993-15-git-send-email-iuliana.prodan@nxp.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1563494276-3993-1-git-send-email-iuliana.prodan@nxp.com> References: <1563494276-3993-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