Revision: 15069
http://sourceforge.net/p/edk2/code/15069
Author: li-elvin
Date: 2014-01-09 08:47:03 +0000 (Thu, 09 Jan 2014)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Feng Tian <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c
trunk/edk2/MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c
Modified: trunk/edk2/MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c 2014-01-09 07:05:09 UTC
(rev 15068)
+++ trunk/edk2/MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c 2014-01-09 08:47:03 UTC
(rev 15069)
@@ -1424,22 +1424,20 @@
&DeviceHandleBuffer
);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // Disconnect the driver specified by Driver BindingHandle from all
- // the devices in the handle database.
- //
- for (Index = 0; Index < DeviceHandleCount; Index++) {
- Status = gBS->DisconnectController (
- DeviceHandleBuffer[Index],
- gI2cBusDriverBinding.DriverBindingHandle,
- NULL
- );
- if (EFI_ERROR (Status)) {
- goto Done;
+ if (!EFI_ERROR (Status)) {
+ //
+ // Disconnect the driver specified by Driver BindingHandle from all
+ // the devices in the handle database.
+ //
+ for (Index = 0; Index < DeviceHandleCount; Index++) {
+ Status = gBS->DisconnectController (
+ DeviceHandleBuffer[Index],
+ gI2cBusDriverBinding.DriverBindingHandle,
+ NULL
+ );
+ if (EFI_ERROR (Status)) {
+ goto Done;
+ }
}
}
Modified: trunk/edk2/MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c 2014-01-09 07:05:09 UTC
(rev 15068)
+++ trunk/edk2/MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c 2014-01-09 08:47:03 UTC
(rev 15069)
@@ -1147,22 +1147,20 @@
&DeviceHandleBuffer
);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // Disconnect the driver specified by ImageHandle from all
- // the devices in the handle database.
- //
- for (Index = 0; Index < DeviceHandleCount; Index++) {
- Status = gBS->DisconnectController (
- DeviceHandleBuffer[Index],
- ImageHandle,
- NULL
- );
- if (EFI_ERROR (Status)) {
- goto Done;
+ if (!EFI_ERROR (Status)) {
+ //
+ // Disconnect the driver specified by ImageHandle from all
+ // the devices in the handle database.
+ //
+ for (Index = 0; Index < DeviceHandleCount; Index++) {
+ Status = gBS->DisconnectController (
+ DeviceHandleBuffer[Index],
+ ImageHandle,
+ NULL
+ );
+ if (EFI_ERROR (Status)) {
+ goto Done;
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits