Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4611004ybi; Tue, 30 Jul 2019 05:10:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1UaPgzlAewrChWCoAKbdap9c6ujAa1DskR+LR+EXPVhPoeaT+T2NQCG1cgJpx7Iu2Vc0E X-Received: by 2002:a17:902:9349:: with SMTP id g9mr113024863plp.262.1564488601359; Tue, 30 Jul 2019 05:10:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564488601; cv=none; d=google.com; s=arc-20160816; b=p2eXTKGAwdFrH0cSYvnvvsObR1d7eRqB6QdEVN5iNDaLhQll+2ATePECwKX8ugX6l1 dkMNcwJmcwiJMScIfQ3QD/q1A6NkcYEHGoKZwfpANlhXx5eyGJTQCGtX6NTeERZArisa kEAR/QurUdZ60UYSE/I8foig1vJNvorj3hBZi/P24l5xgsv+pyZK7/QkicnjgyPMfRml xRux4WJapwcdYWZ3ugqDvDHM0FypwVJ+gjLDGYMJU/7Swvs/A/gUH9I2xCWt475F0h8s KTD1HJ3oNvMjOFcdlvytrIoDvTFLT4jj4bfsE1ijGR0pydGyrJ8/25UbIIABG0AWD0bJ 8crw== 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=BwVI35nBoB5T6dna74Uuqg9VaO7rffxTrIV3nwv8R70=; b=a1xxbnI2UdymbnN99FmyH2XdSEAO3x4W+aosvSXDLpEdsjnFrd5TPCvIXqzanbSpr9 kc2PnKzT9HhAtykzxDOTBPqwMDC3TCwMxHmMAf4IqOCzbIH56d1JTyYJtedLRX0Y1lzd QLRVRRe+/w//tQSs76kL2kaLUBumMK535nxqW1h4gwaZVxEggDv/pnx216buYMEABauM nEcYAW3tL05Zhi424DkOxY4m9JzIUJ5LSw2uHZIRZUKV6OfRMnu/uV9POhTn8nDV/LLL 66h7hklYMyJU/lYpTJcZVsuNvPGPnzoD8Ueu6wvkVQUPo6NxeYYR47siexXmZRdj/aor yYoA== 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 64si25941479ply.15.2019.07.30.05.09.48; Tue, 30 Jul 2019 05:10:01 -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 S1730340AbfG3LHR (ORCPT + 99 others); Tue, 30 Jul 2019 07:07:17 -0400 Received: from inva021.nxp.com ([92.121.34.21]:55702 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730377AbfG3LG5 (ORCPT ); Tue, 30 Jul 2019 07:06:57 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 9CDD0200682; Tue, 30 Jul 2019 13:06:55 +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 8FEF120067A; Tue, 30 Jul 2019 13:06:55 +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 261F7204D6; Tue, 30 Jul 2019 13:06:55 +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 v4 14/14] crypto: caam - change return value in case CAAM has no MDHA Date: Tue, 30 Jul 2019 14:06:45 +0300 Message-Id: <1564484805-28735-15-git-send-email-iuliana.prodan@nxp.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1564484805-28735-1-git-send-email-iuliana.prodan@nxp.com> References: <1564484805-28735-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 2ce5a79..262be3a 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