mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
crypto: dh - Remove pointless checks for NULL 'p' and 'g'
Neither 'p' nor 'g' can be NULL, as they were unpacked using crypto_dh_decode_key(). And it makes no sense for them to be optional. So remove the NULL checks that were copy-and-pasted into both modules. Signed-off-by: Eric Biggers <[email protected]> Reviewed-by: Tudor Ambarus <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
5829cc8da9
commit
ced6a58638
2 changed files with 0 additions and 6 deletions
|
|
@ -53,9 +53,6 @@ static int dh_check_params_length(unsigned int p_len)
|
|||
|
||||
static int dh_set_params(struct dh_ctx *ctx, struct dh *params)
|
||||
{
|
||||
if (unlikely(!params->p || !params->g))
|
||||
return -EINVAL;
|
||||
|
||||
if (dh_check_params_length(params->p_size << 3))
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue