I'm not familiar with the code so I cannot decide if ignoring the return values
is a bug or not. At least, it looks awkward and should be annotated.
Signed-off-by: Marc Hartmayer <mhartmay(a)linux.ibm.com>
---
src/conf/node_device_conf.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index c146a9f0c881..2f9abf5d9938 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -2646,11 +2646,13 @@ virNodeDeviceUpdateCaps(virNodeDeviceDef *def)
while (cap) {
switch (cap->data.type) {
case VIR_NODE_DEV_CAP_SCSI_HOST:
- virNodeDeviceGetSCSIHostCaps(&cap->data.scsi_host);
+ if (virNodeDeviceGetSCSIHostCaps(&cap->data.scsi_host) < 0)
+ return -1;
break;
case VIR_NODE_DEV_CAP_SCSI_TARGET:
- virNodeDeviceGetSCSITargetCaps(def->sysfs_path,
- &cap->data.scsi_target);
+ if (virNodeDeviceGetSCSITargetCaps(def->sysfs_path,
+ &cap->data.scsi_target) < 0)
+ return -1;
break;
case VIR_NODE_DEV_CAP_NET:
if (virNetDevGetLinkInfo(cap->data.net.ifname,
--
2.34.1