On Mon, May 09, 2016 at 10:40:40PM +0100, Salvatore Benedetto wrote:
>
> +static int dh_set_params(struct crypto_kpp *tfm, void *buffer,
> + unsigned int len)
> +{
> + struct dh_ctx *ctx = dh_get_ctx(tfm);
> + struct dh_params *params = (struct dh_params *)buffer;
> +
> + if (unlikely(!buffer || !len))
> + return -EINVAL;
What's the point of len? It's never checked anywhere apart from
this non-zero check which is pointless. Just get rid of it.
Cheers,
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html