Message ID | 1620800831-53346-9-git-send-email-tanghui20@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
Series | crypto: hisilicon/hpre - fix coding style | expand |
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)
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(-)