From: Colin Ian King Date: Wed, 15 Apr 2020 23:03:58 +0000 (+0100) Subject: crypto: algif_rng - remove redundant assignment to variable err X-Git-Tag: v5.10.7~2354^2~96 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=63e05f3275172283fd0020dba678ef8eca869ef7;p=platform%2Fkernel%2Flinux-rpi.git crypto: algif_rng - remove redundant assignment to variable err The variable err is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu --- diff --git a/crypto/algif_rng.c b/crypto/algif_rng.c index 22df379..087c0ad 100644 --- a/crypto/algif_rng.c +++ b/crypto/algif_rng.c @@ -61,7 +61,7 @@ static int rng_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, struct sock *sk = sock->sk; struct alg_sock *ask = alg_sk(sk); struct rng_ctx *ctx = ask->private; - int err = -EFAULT; + int err; int genlen = 0; u8 result[MAXSIZE];