summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-04-16 00:03:58 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2020-04-24 17:42:16 +1000
commit63e05f3275172283fd0020dba678ef8eca869ef7 (patch)
tree770b52c9e56efec1036c626b94f45de30e6207c1 /crypto
parent8a656a48f75f193b901efe14326663505874c37a (diff)
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 <colin.king@canonical.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/algif_rng.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/algif_rng.c b/crypto/algif_rng.c
index 22df3799a17b..087c0ad09d38 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];