From patchwork Thu Sep 18 02:48:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rusty Russell X-Patchwork-Id: 4928621 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 056E39F4D5 for ; Thu, 18 Sep 2014 02:51:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 10F3520158 for ; Thu, 18 Sep 2014 02:52:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CF5D920179 for ; Thu, 18 Sep 2014 02:52:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757426AbaIRCwF (ORCPT ); Wed, 17 Sep 2014 22:52:05 -0400 Received: from ozlabs.org ([103.22.144.67]:49243 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757004AbaIRCwB (ORCPT ); Wed, 17 Sep 2014 22:52:01 -0400 Received: by ozlabs.org (Postfix, from userid 1011) id 87B191401EC; Thu, 18 Sep 2014 12:52:00 +1000 (EST) From: Rusty Russell To: Amos Kong , virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, herbert@gondor.apana.org.au, m@bues.ch, mb@bu3sch.de, mpm@selenic.com, amit.shah@redhat.com, linux-kernel@vger.kernel.org Cc: Rusty Russell Subject: [PATCH 5/5] hw_random: don't init list element we're about to add to list. Date: Thu, 18 Sep 2014 12:18:26 +0930 Message-Id: <1411008506-28349-5-git-send-email-rusty@rustcorp.com.au> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1411008506-28349-1-git-send-email-rusty@rustcorp.com.au> References: <87wq91odhf.fsf@rustcorp.com.au> <1411008506-28349-1-git-send-email-rusty@rustcorp.com.au> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Another interesting anti-pattern. Signed-off-by: Rusty Russell --- drivers/char/hw_random/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index 6a34feca6b43..96fa06716e95 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) {