Skip to content

Commit

Permalink
xilinx_axienet.c: Assert no error when making link
Browse files Browse the repository at this point in the history
This gives an awful silent failure when it doesn't work. Assert against link
creation failure.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
pete128 authored and stefanhaRH committed Feb 21, 2013
1 parent 87f1361 commit b15aaca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hw/xilinx_axienet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down

0 comments on commit b15aaca

Please sign in to comment.