From patchwork Mon Feb 11 07:16:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Crosthwaite X-Patchwork-Id: 219542 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 304DF2C0090 for ; Mon, 11 Feb 2013 18:16:34 +1100 (EST) Received: from localhost ([::1]:41688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4ncu-0007o5-BQ for incoming@patchwork.ozlabs.org; Mon, 11 Feb 2013 02:16:32 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4ncm-0007lp-Qs for qemu-devel@nongnu.org; Mon, 11 Feb 2013 02:16:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U4ncl-0006MW-Q9 for qemu-devel@nongnu.org; Mon, 11 Feb 2013 02:16:24 -0500 Received: from ch1ehsobe006.messaging.microsoft.com ([216.32.181.186]:46199 helo=ch1outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4ncj-0006M5-NM; Mon, 11 Feb 2013 02:16:21 -0500 Received: from mail246-ch1-R.bigfish.com (10.43.68.253) by CH1EHSOBE009.bigfish.com (10.43.70.59) with Microsoft SMTP Server id 14.1.225.23; Mon, 11 Feb 2013 07:16:20 +0000 Received: from mail246-ch1 (localhost [127.0.0.1]) by mail246-ch1-R.bigfish.com (Postfix) with ESMTP id E20B01B801BE; Mon, 11 Feb 2013 07:16:19 +0000 (UTC) X-Forefront-Antispam-Report: CIP:149.199.60.83; KIP:(null); UIP:(null); IPV:NLI; H:xsj-gw1; RD:unknown-60-83.xilinx.com; EFVD:NLI X-SpamScore: 1 X-BigFish: VPS1(zzzz1f42h1ee6h1de0h1202h1e76h1d1ah1d2ahzz8275bhz2fh95h668h839hd24hf0ah119dh1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14ddh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h906i1155h) Received-SPF: pass (mail246-ch1: domain of xilinx.com designates 149.199.60.83 as permitted sender) client-ip=149.199.60.83; envelope-from=peter.crosthwaite@xilinx.com; helo=xsj-gw1 ; helo=xsj-gw1 ; Received: from mail246-ch1 (localhost.localdomain [127.0.0.1]) by mail246-ch1 (MessageSwitch) id 1360566978601290_24389; Mon, 11 Feb 2013 07:16:18 +0000 (UTC) Received: from CH1EHSMHS010.bigfish.com (snatpool2.int.messaging.microsoft.com [10.43.68.239]) by mail246-ch1.bigfish.com (Postfix) with ESMTP id 865631A40048; Mon, 11 Feb 2013 07:16:18 +0000 (UTC) Received: from xsj-gw1 (149.199.60.83) by CH1EHSMHS010.bigfish.com (10.43.70.10) with Microsoft SMTP Server id 14.1.225.23; Mon, 11 Feb 2013 07:16:18 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-smtp1.xilinx.com) by xsj-gw1 with esmtp (Exim 4.63) (envelope-from ) id 1U4ncf-0001t6-SC; Sun, 10 Feb 2013 23:16:17 -0800 From: Peter Crosthwaite To: Date: Mon, 11 Feb 2013 17:16:05 +1000 X-Mailer: git-send-email 1.7.0.4 X-RCIS-Action: ALLOW MIME-Version: 1.0 Message-ID: <0c6a908b-571a-4573-b175-47f760f22135@CH1EHSMHS010.ehs.local> X-OriginatorOrg: xilinx.com X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 216.32.181.186 Cc: qemu-trivial@nongnu.org, Peter Crosthwaite Subject: [Qemu-devel] [PATCH] 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 This gives an awful silent failure when it doesn't work. Assert against link creation failure. Signed-off-by: Peter Crosthwaite --- hw/xilinx_axienet.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) 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[] = {