The calling function will log the error. Just return NULL if a device cannot be found. Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx> --- src/node_device/node_device_driver.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index c11b8d89ab..cb90401d0a 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -630,11 +630,8 @@ nodeDeviceFindAddressByName(const char *name) char *addr = NULL; virNodeDeviceObjPtr dev = virNodeDeviceObjListFindByName(driver->devs, name); - if (!dev) { - virReportError(VIR_ERR_NO_NODE_DEVICE, - _("could not find device '%s'"), name); + if (!dev) return NULL; - } def = virNodeDeviceObjGetDef(dev); for (caps = def->caps; caps != NULL; caps = caps->next) { -- 2.26.3