Alona Kaplan has uploaded a new change for review.

Change subject: engine: fix coverity issue- null when calling 
getPciDeviceByNic(..)
......................................................................

engine: fix coverity issue- null when calling getPciDeviceByNic(..)

Change-Id: Ia57acff01ccfe846ba30aa72cd4e2d7f1b2e3edf
Signed-off-by: Alona Kaplan <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/HostNicVfsConfigHelperImpl.java
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/43/39443/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/HostNicVfsConfigHelperImpl.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/HostNicVfsConfigHelperImpl.java
index 2061b5b..7bd48b8 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/HostNicVfsConfigHelperImpl.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/HostNicVfsConfigHelperImpl.java
@@ -101,8 +101,11 @@
         }
 
         HostDevice pciDevice = getPciDeviceByNic(nic, deviceList);
-        hostNicVfsConfig.setMaxNumOfVfs(getMaxNumOfVfs(pciDevice));
-        hostNicVfsConfig.setNumOfVfs(getNumOfVfs(nic.getName(), pciDevice, 
deviceList));
+
+        if (pciDevice != null) {
+            hostNicVfsConfig.setMaxNumOfVfs(getMaxNumOfVfs(pciDevice));
+            hostNicVfsConfig.setNumOfVfs(getNumOfVfs(nic.getName(), pciDevice, 
deviceList));
+        }
     }
 
     private HostDevice getPciDeviceByNic(final VdsNetworkInterface nic, 
List<HostDevice> deviceList) {


-- 
To view, visit https://gerrit.ovirt.org/39443
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia57acff01ccfe846ba30aa72cd4e2d7f1b2e3edf
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to