mirror of https://gitee.com/openkylin/linux.git
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