summaryrefslogtreecommitdiff
path: root/NetworkPkg/IScsiDxe/IScsiDriver.c
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkPkg/IScsiDxe/IScsiDriver.c')
-rw-r--r--NetworkPkg/IScsiDxe/IScsiDriver.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.c b/NetworkPkg/IScsiDxe/IScsiDriver.c
index 42ac8f0fe7..8d1742455c 100644
--- a/NetworkPkg/IScsiDxe/IScsiDriver.c
+++ b/NetworkPkg/IScsiDxe/IScsiDriver.c
@@ -651,7 +651,9 @@ IScsiStart (
&gIScsiConfigGuid,
&AttemptConfigOrderSize
);
- ASSERT (AttemptConfigOrder != NULL);
+ if (AttemptConfigOrder == NULL) {
+ goto ON_ERROR;
+ }
for (Index = 0; Index < AttemptConfigOrderSize / sizeof (UINT8); Index++) {
if (AttemptConfigOrder[Index] == mPrivate->BootSelectedIndex ||
AttemptConfigOrder[Index] == BootSelected) {
@@ -689,7 +691,9 @@ IScsiStart (
goto ON_EXIT;
} else {
- ASSERT (AttemptConfigOrder[Index] == BootSelected);
+ if (AttemptConfigOrder[Index] != BootSelected) {
+ goto ON_ERROR;
+ }
mPrivate->BootSelectedIndex = BootSelected;
//
// Clear the resource in ExistPrivate.