mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-13 08:58:33 +03:00
nodedev: don't log error in nodeDeviceFindAddressByName()
The calling function will log the error. Just return NULL if a device cannot be found. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
4ea5819d6e
commit
67ca558f5c
@ -645,11 +645,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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user