提交 2d2ec064 编写于 作者: R Rusty Russell 提交者: Herbert Xu

hwrng: don't init list element we're about to add to list.

Another interesting anti-pattern.
Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 ebbbfa24
...@@ -485,7 +485,6 @@ int hwrng_register(struct hwrng *rng) ...@@ -485,7 +485,6 @@ int hwrng_register(struct hwrng *rng)
goto out_unlock; goto out_unlock;
} }
} }
INIT_LIST_HEAD(&rng->list);
list_add_tail(&rng->list, &rng_list); list_add_tail(&rng->list, &rng_list);
if (old_rng && !rng->init) { if (old_rng && !rng->init) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册