mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-22 22:04:47 +08:00
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>
This commit is contained in:
parent
ebbbfa2483
commit
2d2ec0642a
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user