Skip to content

Commit

Permalink
hwrng: don't init list element we're about to add to list.
Browse files Browse the repository at this point in the history
Another interesting anti-pattern.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Rusty Russell authored and Herbert Xu committed Dec 22, 2014
1 parent ebbbfa2 commit 2d2ec06
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/char/hw_random/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2d2ec06

Please sign in to comment.