If the driver does not start before, we do not disconnect driver and we must still uninstall other protocols on image handle. The original implementation of error return is not correct.

Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15069 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Elvin Li 2014-01-09 08:47:03 +00:00 committed by li-elvin
parent e6aaef28b8
commit 2fa77862fd
2 changed files with 28 additions and 32 deletions

View File

@ -1424,10 +1424,7 @@ I2cBusUnload (
&DeviceHandleBuffer
);
if (EFI_ERROR (Status)) {
return Status;
}
if (!EFI_ERROR (Status)) {
//
// Disconnect the driver specified by Driver BindingHandle from all
// the devices in the handle database.
@ -1442,6 +1439,7 @@ I2cBusUnload (
goto Done;
}
}
}
//
// Uninstall all the protocols installed in the driver entry point

View File

@ -1147,10 +1147,7 @@ I2cHostUnload (
&DeviceHandleBuffer
);
if (EFI_ERROR (Status)) {
return Status;
}
if (!EFI_ERROR (Status)) {
//
// Disconnect the driver specified by ImageHandle from all
// the devices in the handle database.
@ -1165,6 +1162,7 @@ I2cHostUnload (
goto Done;
}
}
}
//
// Uninstall all the protocols installed in the driver entry point