mirror of https://github.com/xemu-project/xemu.git
xilinx_axienet.c: Assert no error when making link
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>
This commit is contained in:
parent
87f1361c19
commit
b15aaca430
|
@ -869,9 +869,11 @@ static int xilinx_enet_init(SysBusDevice *dev)
|
||||||
static void xilinx_enet_initfn(Object *obj)
|
static void xilinx_enet_initfn(Object *obj)
|
||||||
{
|
{
|
||||||
struct XilinxAXIEnet *s = FROM_SYSBUS(typeof(*s), SYS_BUS_DEVICE(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_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[] = {
|
static Property xilinx_enet_properties[] = {
|
||||||
|
|
Loading…
Reference in New Issue