Skip to content

Commit

Permalink
crypto: hisilicon/hpre - add 'default' for switch statement
Browse files Browse the repository at this point in the history
Return error immediately if it goto 'default' path.

Signed-off-by: Hui Tang <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
Hui Tang authored and herbertx committed May 21, 2021
1 parent 0c176d8 commit 302e909
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/crypto/hisilicon/hpre/hpre_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 302e909

Please sign in to comment.