提交 b15aaca4 编写于 作者: P Peter Crosthwaite 提交者: Stefan Hajnoczi

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: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 87f1361c
......@@ -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[] = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册