On 4/13/21 4:39 PM, Jonathon Jongsma wrote:
The calling function will log the error. Just return NULL if a device
cannot be found.
Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
Reviewed-by: Laine Stump <laine@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 5f8995172d..4cf4e4214f 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;
virNodeDeviceObj *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) {