From patchwork Wed Dec 18 16:59:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 302994 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id EBC1F2C00B2 for ; Thu, 19 Dec 2013 04:22:24 +1100 (EST) Received: from localhost ([::1]:39827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtKpB-0007LW-Vn for incoming@patchwork.ozlabs.org; Wed, 18 Dec 2013 12:22:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtKoi-0007Ka-T3 for qemu-devel@nongnu.org; Wed, 18 Dec 2013 12:21:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtKod-0007mz-RS for qemu-devel@nongnu.org; Wed, 18 Dec 2013 12:21:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:28777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtKod-0007mm-JJ for qemu-devel@nongnu.org; Wed, 18 Dec 2013 12:21:47 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBIHLi6S017226 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 18 Dec 2013 12:21:45 -0500 Received: from localhost (ovpn-113-56.phx2.redhat.com [10.3.113.56]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rBIH08bh005903; Wed, 18 Dec 2013 12:00:09 -0500 From: Luiz Capitulino To: anthony@codemonkey.ws Date: Wed, 18 Dec 2013 11:59:53 -0500 Message-Id: <1387386003-8949-4-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1387386003-8949-1-git-send-email-lcapitulino@redhat.com> References: <1387386003-8949-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [PULL 03/13] hw/core/qdev: Delete dead code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Peter Crosthwaite This is unreachable code, as it's already asserted that no errors have occurred. Delete. Signed-off-by: Peter Crosthwaite Reviewed-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- hw/core/qdev.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index e374a93..adbff18 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -746,11 +746,6 @@ static void device_initfn(Object *obj) } class = object_class_get_parent(class); } while (class != object_class_by_name(TYPE_DEVICE)); - if (err != NULL) { - qerror_report_err(err); - error_free(err); - exit(1); - } object_property_add_link(OBJECT(dev), "parent_bus", TYPE_BUS, (Object **)&dev->parent_bus, &err);