summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorHui Tang <tanghui20@huawei.com>2021-05-12 14:27:11 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2021-05-21 16:17:31 +0800
commit302e909cb22b5456ae71a9fd54b98ee0e6505613 (patch)
tree7273607cd473af928a1f2b8bae15136015abdf6b /drivers/crypto
parent0c176d8d7d970db6fed82db3495a73d10d2251fb (diff)
crypto: hisilicon/hpre - add 'default' for switch statement
Return error immediately if it goto 'default' path. Signed-off-by: Hui Tang <tanghui20@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/hisilicon/hpre/hpre_crypto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/hisilicon/hpre/hpre_crypto.c b/drivers/crypto/hisilicon/hpre/hpre_crypto.c
index 7449632986c5..294c3688aabb 100644
--- a/drivers/crypto/hisilicon/hpre/hpre_crypto.c
+++ b/drivers/crypto/hisilicon/hpre/hpre_crypto.c
@@ -623,9 +623,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)