Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5963287ybi; Wed, 31 Jul 2019 06:10:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIuZniEzqKPa4frpSgWNDEcHqXx8M0jpg2hZoXGkghTS6e1d/glBFq+UG39/E4Y1B8p5cP X-Received: by 2002:a17:902:b603:: with SMTP id b3mr122124672pls.9.1564578639569; Wed, 31 Jul 2019 06:10:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564578639; cv=none; d=google.com; s=arc-20160816; b=0X7bdj6uoS/3LMP/mtnsBsevtDGCYmPtU1cC974CWXdPoFk+pHcphUurY9nFfnOLVw BtEjJp/qaKnN9HBZaJX7nepOikMITyl3SdCHE5Qna80ZDehTfb4nPmU34rS22Y26AjAW J8cuVcoxk4xcEGjN2axG25f9y40/7xPFhQroJB3yifNJGv/nscR37sJPkKvoW42bt7Tz TaBmRDCAwDOBlJr5PGDf9liw/kZyeRy0bkW7cMQlKyo35RkQ2V78BGGtu9FgqV9ZxDz4 ESEzJYXevpuPjoCwBpngL/OWzFpRWaOU0Tl8z6dWnDfGxxTwKQ48Ea1iyEky/H/rzayD +qpA== 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=SBy4snVJLJLC45ce7rZ5j28xpxozKdwtG96PSjTqcrA=; b=PkUatVWDdp3wswJzQzezSEhSBheWgVHyk8CBw+FNgr1JuRfccFGnXSHnt3ha4CBxtP n/w6+sWmmoSKVoIiME6rgnScEgnJayLL3KJUgV7jI6NdetVmu+z2y7C8DwvGfl/sbcny 7pRiMZ6RJ2vmnIN+xdIFMXBNHtbXZiJo1IMUXa1d+jZ6/BzZ2FcYu5Lg4DHCLjrhJHP+ WuglfGVY9qBlvd/aHeoXt6gY9MDqyx0OIcJIoRfIV39jogbtGkg+uGi4DkaMjv1TEFC7 WA2YHVCZUyxdcGIyHg/Q92rFzGpJjEvMtk0dRc5hM/VxGSdUF72fNJUafydbvZUorg5a w+WQ== 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 v19si30273760pff.229.2019.07.31.06.10.26; Wed, 31 Jul 2019 06:10:39 -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 S2387682AbfGaNJ1 (ORCPT + 99 others); Wed, 31 Jul 2019 09:09:27 -0400 Received: from inva020.nxp.com ([92.121.34.13]:35306 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388174AbfGaNI2 (ORCPT ); Wed, 31 Jul 2019 09:08:28 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6627F1A09E3; Wed, 31 Jul 2019 15:08:26 +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 5A4761A09DB; Wed, 31 Jul 2019 15:08:26 +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 0743B205F3; Wed, 31 Jul 2019 15:08:25 +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 v5 14/14] crypto: caam - change return value in case CAAM has no MDHA Date: Wed, 31 Jul 2019 16:08:15 +0300 Message-Id: <1564578495-9883-15-git-send-email-iuliana.prodan@nxp.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1564578495-9883-1-git-send-email-iuliana.prodan@nxp.com> References: <1564578495-9883-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 ed1931f..8a07edb 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