From patchwork Wed Feb 4 17:33:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 436434 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 6B34F140129 for ; Thu, 5 Feb 2015 04:34:03 +1100 (AEDT) Received: from localhost ([::1]:37620 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ3px-0006ew-BK for incoming@patchwork.ozlabs.org; Wed, 04 Feb 2015 12:34:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ3pI-0005dz-3K for qemu-devel@nongnu.org; Wed, 04 Feb 2015 12:33:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJ3pB-0004FC-VX for qemu-devel@nongnu.org; Wed, 04 Feb 2015 12:33:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ3pB-0004Ex-OK for qemu-devel@nongnu.org; Wed, 04 Feb 2015 12:33:13 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t14HXBhj023858 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 4 Feb 2015 12:33:12 -0500 Received: from blackfin.pond.sub.org (ovpn-116-58.ams2.redhat.com [10.36.116.58]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t14HXAVU018416 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 4 Feb 2015 12:33:11 -0500 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 8C84230408AA; Wed, 4 Feb 2015 18:33:08 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Wed, 4 Feb 2015 18:33:02 +0100 Message-Id: <1423071188-1085-3-git-send-email-armbru@redhat.com> In-Reply-To: <1423071188-1085-1-git-send-email-armbru@redhat.com> References: <1423071188-1085-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Kevin Wolf , afaerber@suse.de, Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 2/8] ide/isa: Replace unchecked qdev_init() by qdev_init_nofail() 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 isa_ide_init()'s callers don't check for failure. isa_ide_init() looks like it could fail, but since isa_ide_realizefn() can't fail, it actually can't. Replace its qdev_init() by qdev_init_nofail() to make it obvious. Cc: Kevin Wolf Cc: Stefan Hajnoczi Signed-off-by: Markus Armbruster --- hw/ide/isa.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/ide/isa.c b/hw/ide/isa.c index b084162..c0c4e1b 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -88,9 +88,7 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, qdev_prop_set_uint32(dev, "iobase", iobase); qdev_prop_set_uint32(dev, "iobase2", iobase2); qdev_prop_set_uint32(dev, "irq", isairq); - if (qdev_init(dev) < 0) { - return NULL; - } + qdev_init_nofail(dev); s = ISA_IDE(dev); if (hd0) {