summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2014-12-08 09:50:40 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2014-12-22 13:02:41 +0100
commit2d2ec0642a85966b6a299bbcd94707982327ace8 (patch)
tree8145fcdb8eb9e27f3d6c23ba1999d69a92de1e21 /drivers/char
parenthwrng: don't double-check old_rng. (diff)
downloadlinux-2d2ec0642a85966b6a299bbcd94707982327ace8.tar.xz
linux-2d2ec0642a85966b6a299bbcd94707982327ace8.zip
hwrng: don't init list element we're about to add to list.
Another interesting anti-pattern. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/hw_random/core.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index e384ee3ed604..6ec42252e46e 100644
--- a/drivers/char/hw_random/core.c
+++ b/drivers/char/hw_random/core.c
@@ -485,7 +485,6 @@ int hwrng_register(struct hwrng *rng)
goto out_unlock;
}
}
- INIT_LIST_HEAD(&rng->list);
list_add_tail(&rng->list, &rng_list);
if (old_rng && !rng->init) {