From patchwork Thu Feb 21 09:50:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 222224 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1D08D2C0091 for ; Thu, 21 Feb 2013 20:51:15 +1100 (EST) Received: from localhost ([::1]:55130 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8So5-0003tx-67 for incoming@patchwork.ozlabs.org; Thu, 21 Feb 2013 04:51:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8Snl-0003YZ-PS for qemu-devel@nongnu.org; Thu, 21 Feb 2013 04:51:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8Sne-00073d-0Y for qemu-devel@nongnu.org; Thu, 21 Feb 2013 04:50:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8Snd-00073W-PA for qemu-devel@nongnu.org; Thu, 21 Feb 2013 04:50:45 -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 r1L9oign020740 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Feb 2013 04:50:45 -0500 Received: from localhost (ovpn-112-33.ams2.redhat.com [10.36.112.33]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r1L9ohgh011067; Thu, 21 Feb 2013 04:50:44 -0500 From: Stefan Hajnoczi To: Date: Thu, 21 Feb 2013 10:50:30 +0100 Message-Id: <1361440233-8672-3-git-send-email-stefanha@redhat.com> In-Reply-To: <1361440233-8672-1-git-send-email-stefanha@redhat.com> References: <1361440233-8672-1-git-send-email-stefanha@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: Anthony Liguori , Peter Crosthwaite , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 2/5] xilinx_axienet.c: Assert no error when making link 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 gives an awful silent failure when it doesn't work. Assert against link creation failure. Signed-off-by: Peter Crosthwaite Signed-off-by: Stefan Hajnoczi --- hw/xilinx_axienet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/xilinx_axienet.c b/hw/xilinx_axienet.c index 34e344c..e5d9251 100644 --- a/hw/xilinx_axienet.c +++ b/hw/xilinx_axienet.c @@ -869,9 +869,11 @@ static int xilinx_enet_init(SysBusDevice *dev) static void xilinx_enet_initfn(Object *obj) { struct XilinxAXIEnet *s = FROM_SYSBUS(typeof(*s), SYS_BUS_DEVICE(obj)); + Error *errp = NULL; object_property_add_link(obj, "axistream-connected", TYPE_STREAM_SLAVE, - (Object **) &s->tx_dev, NULL); + (Object **) &s->tx_dev, &errp); + assert_no_error(errp); } static Property xilinx_enet_properties[] = {