From patchwork Thu Feb 24 21:56:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 588581 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1OLuQ4L029606 for ; Thu, 24 Feb 2011 21:57:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754445Ab1BXV43 (ORCPT ); Thu, 24 Feb 2011 16:56:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1029 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753902Ab1BXV41 (ORCPT ); Thu, 24 Feb 2011 16:56:27 -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 p1OLuRNb027604 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 24 Feb 2011 16:56:27 -0500 Received: from trasno.mitica (ovpn-113-97.phx2.redhat.com [10.3.113.97]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p1OLuKd0010922; Thu, 24 Feb 2011 16:56:26 -0500 From: Juan Quintela To: kvm@vger.kernel.org Cc: alex.williamson@redhat.com Subject: [PATCH 3/3] device-assignment: remove qemu_mallocz() test Date: Thu, 24 Feb 2011 22:56:20 +0100 Message-Id: <547e9ae9b39cd38de14067c1036175bbf9d2a8e3.1298584362.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 24 Feb 2011 21:57:59 +0000 (UTC) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index dc70b80..968a8d9 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -319,11 +319,6 @@ static void assigned_dev_ioport_map(PCIDevice *pci_dev, int region_num, struct ioperm_data *data; data = qemu_mallocz(sizeof(struct ioperm_data)); - if (data == NULL) { - fprintf(stderr, "%s: Out of memory\n", __func__); - exit(1); - } - data->start_port = region->u.r_baseport; data->num = region->r_size; data->turn_on = 1;