@retval EFI_DEVICE_ERROR There was an I2C error (NACK) during the\r
transaction.\r
@retval EFI_INVALID_PARAMETER RequestPacket is NULL\r
- @retval EFI_NOT_FOUND Reserved bit set in the SlaveAddress parameter\r
@retval EFI_NO_MAPPING The EFI_I2C_HOST_PROTOCOL could not set the\r
bus configuration required to access this I2C\r
device.\r
&DeviceHandleBuffer\r
);\r
\r
- if (EFI_ERROR (Status)) {\r
- return Status;\r
- }\r
-\r
- //\r
- // Disconnect the driver specified by Driver BindingHandle from all\r
- // the devices in the handle database.\r
- //\r
- for (Index = 0; Index < DeviceHandleCount; Index++) {\r
- Status = gBS->DisconnectController (\r
- DeviceHandleBuffer[Index],\r
- gI2cBusDriverBinding.DriverBindingHandle,\r
- NULL\r
- );\r
- if (EFI_ERROR (Status)) {\r
- goto Done;\r
+ if (!EFI_ERROR (Status)) {\r
+ //\r
+ // Disconnect the driver specified by Driver BindingHandle from all\r
+ // the devices in the handle database.\r
+ //\r
+ for (Index = 0; Index < DeviceHandleCount; Index++) {\r
+ Status = gBS->DisconnectController (\r
+ DeviceHandleBuffer[Index],\r
+ gI2cBusDriverBinding.DriverBindingHandle,\r
+ NULL\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ goto Done;\r
+ }\r
}\r
}\r
\r