From: Hui Tang <tanghui20@huawei.com>
To: <herbert@gondor.apana.org.au>, <davem@davemloft.net>
Cc: <linux-crypto@vger.kernel.org>, <xuzaibo@huawei.com>,
<wangzhou1@hisilicon.com>, <linux-kernel@vger.kernel.org>
Subject: [PATCH 8/8] crypto: hisilicon/hpre - add 'default' for switch statement
Date: Mon, 10 May 2021 17:06:51 +0800 [thread overview]
Message-ID: <1620637611-41643-9-git-send-email-tanghui20@huawei.com> (raw)
In-Reply-To: <1620637611-41643-1-git-send-email-tanghui20@huawei.com>
Return error immediately if it goto 'default' path.
Signed-off-by: Hui Tang <tanghui20@huawei.com>
---
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/hisilicon/hpre/hpre_crypto.c b/drivers/crypto/hisilicon/hpre/hpre_crypto.c
index fb8e9c0..b4b12dc 100644
--- a/drivers/crypto/hisilicon/hpre/hpre_crypto.c
+++ b/drivers/crypto/hisilicon/hpre/hpre_crypto.c
@@ -617,9 +617,9 @@ static int hpre_is_dh_params_length_valid(unsigned int key_sz)
case _HPRE_DH_GRP15:
case _HPRE_DH_GRP16:
return 0;
+ default:
+ return -EINVAL;
}
-
- return -EINVAL;
}
static int hpre_dh_set_params(struct hpre_ctx *ctx, struct dh *params)
--
2.8.1
prev parent reply other threads:[~2021-05-10 9:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 9:06 [PATCH 0/8] crypto: hisilicon/hpre - fix coding style Hui Tang
2021-05-10 9:06 ` [PATCH 1/8] crypto: hisilicon/hpre - the macro 'HPRE_ADDR' expands Hui Tang
2021-05-10 9:06 ` [PATCH 2/8] crypto: hisilicon/hpre - init a structure member each line Hui Tang
2021-05-10 9:06 ` [PATCH 3/8] crypto: hisilicon/hpre - replace macro with inline function Hui Tang
2021-05-10 9:06 ` [PATCH 4/8] crypto: hisilicon/hpre - remove the macro of 'HPRE_DEV' Hui Tang
2021-05-10 9:06 ` [PATCH 5/8] crypto: hisilicon/hpre - delete rudundant initialization Hui Tang
2021-05-10 9:06 ` [PATCH 6/8] crypto: hisilicon/hpre - use 'GENMASK' to generate mask value Hui Tang
2021-05-10 12:05 ` kernel test robot
2021-05-10 9:06 ` [PATCH 7/8] crypto: hisilicon/hpre - delete rudundant macro definition Hui Tang
2021-05-10 9:06 ` Hui Tang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1620637611-41643-9-git-send-email-tanghui20@huawei.com \
--to=tanghui20@huawei.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wangzhou1@hisilicon.com \
--cc=xuzaibo@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®