aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2014-12-08 03:50:40 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2014-12-22 07:02:41 -0500
commit2d2ec0642a85966b6a299bbcd94707982327ace8 (patch)
tree8145fcdb8eb9e27f3d6c23ba1999d69a92de1e21 /drivers/char
parentebbbfa248389b176e2e62d8cf91814253849ccc9 (diff)
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)
485 goto out_unlock; 485 goto out_unlock;
486 } 486 }
487 } 487 }
488 INIT_LIST_HEAD(&rng->list);
489 list_add_tail(&rng->list, &rng_list); 488 list_add_tail(&rng->list, &rng_list);
490 489
491 if (old_rng && !rng->init) { 490 if (old_rng && !rng->init) {