Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/conf/device_conf.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index dbe30b05c1..9b0b81b2cb 100644 --- a/src/conf/device_conf.c +++ b/src/conf/device_conf.c @@ -401,19 +401,15 @@ virDomainDeviceUSBAddressParseXML(xmlNodePtr node, virDomainDeviceUSBAddress *addr) { g_autofree char *port = virXMLPropString(node, "port"); - g_autofree char *bus = virXMLPropString(node, "bus"); memset(addr, 0, sizeof(*addr)); if (port && virDomainDeviceUSBAddressParsePort(addr, port) < 0) return -1; - if (bus && - virStrToLong_uip(bus, NULL, 10, &addr->bus) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Cannot parse <address> 'bus' attribute")); + if (virXMLPropUInt(node, "bus", 10, VIR_XML_PROP_NONE, &addr->bus) < 0) return -1; - } + return 0; } -- 2.26.3