From: Rusty Russell Date: Mon, 8 Dec 2014 08:50:40 +0000 (+0800) Subject: hwrng: don't init list element we're about to add to list. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2d2ec0642a85966b6a299bbcd94707982327ace8;p=openwrt%2Fstaging%2Fblogic.git hwrng: don't init list element we're about to add to list. Another interesting anti-pattern. Signed-off-by: Rusty Russell Signed-off-by: Herbert Xu --- 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) goto out_unlock; } } - INIT_LIST_HEAD(&rng->list); list_add_tail(&rng->list, &rng_list); if (old_rng && !rng->init) {