From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YO1Yi-0003sv-Os for qemu-devel@nongnu.org; Wed, 18 Feb 2015 05:08:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YO1YZ-0008LI-4I for qemu-devel@nongnu.org; Wed, 18 Feb 2015 05:08:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38478) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YO1YY-0008L5-Sn for qemu-devel@nongnu.org; Wed, 18 Feb 2015 05:08:35 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1IA8Yde021944 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 18 Feb 2015 05:08:34 -0500 From: Gerd Hoffmann Date: Wed, 18 Feb 2015 11:08:22 +0100 Message-Id: <1424254105-30237-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1424254105-30237-1-git-send-email-kraxel@redhat.com> References: <1424254105-30237-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 5/8] usb: Change usb_create_simple() to abort on failure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Markus Armbruster , Gerd Hoffmann From: Markus Armbruster Instead of returning null pointer. Matches pci_create_simple(), isa_create_simple(), sysbus_create_simple(). It's unused since the previous commit, but I'll put it to use again shortly. Signed-off-by: Markus Armbruster Signed-off-by: Gerd Hoffmann --- hw/usb/bus.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 5abfac0..d83a938 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -339,14 +339,7 @@ static USBDevice *usb_try_create_simple(USBBus *bus, const char *name, USBDevice *usb_create_simple(USBBus *bus, const char *name) { - Error *err = NULL; - USBDevice *dev = usb_try_create_simple(bus, name, &err); - - if (!dev) { - error_report("%s", error_get_pretty(err)); - error_free(err); - } - return dev; + return usb_try_create_simple(bus, name, &error_abort); } static void usb_fill_port(USBPort *port, void *opaque, int index, -- 1.8.3.1