From patchwork Thu Sep 18 12:37:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amos Kong X-Patchwork-Id: 4930661 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 608459F2EC for ; Thu, 18 Sep 2014 12:38:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2319D2015D for ; Thu, 18 Sep 2014 12:38:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D0DCE201B4 for ; Thu, 18 Sep 2014 12:38:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755631AbaIRMi0 (ORCPT ); Thu, 18 Sep 2014 08:38:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47349 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751080AbaIRMiZ (ORCPT ); Thu, 18 Sep 2014 08:38:25 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8ICcF2O016319 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 18 Sep 2014 08:38:15 -0400 Received: from air.redhat.com (vpn1-112-91.nay.redhat.com [10.66.112.91]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8ICbmAQ022426; Thu, 18 Sep 2014 08:38:12 -0400 From: Amos Kong To: virtualization@lists.linux-foundation.org Cc: kvm@vger.kernel.org, herbert@gondor.apana.org.au, m@bues.ch, mpm@selenic.com, amit.shah@redhat.com, rusty@rustcorp.com.au, linux-kernel@vger.kernel.org Subject: [PATCH v2 6/6] hw_random: don't init list element we're about to add to list. Date: Thu, 18 Sep 2014 20:37:47 +0800 Message-Id: <1411043867-21109-7-git-send-email-akong@redhat.com> In-Reply-To: <1411043867-21109-1-git-send-email-akong@redhat.com> References: <1411043867-21109-1-git-send-email-akong@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Rusty Russell 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 6420409..12187dd 100644 --- a/drivers/char/hw_random/core.c +++ b/drivers/char/hw_random/core.c @@ -486,7 +486,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) {