]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c
MdePkg, MdeModulePkg: Remove EFI_ABORTED from I2C protocols per PI spec 1.4.
[mirror_edk2.git] / MdeModulePkg / Bus / I2c / I2cDxe / I2cBus.c
index 02c3a0e353f74702591f4235d8ec14a34958b435..cad5ad7d44a012c7dfbacb38fa7b222706628fe6 100644 (file)
@@ -2,7 +2,7 @@
   This file implements I2C IO Protocol which enables the user to manipulate a single \r
   I2C device independent of the host controller and I2C design.\r
 \r
-  Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -1108,14 +1108,11 @@ RegisterI2cDevice (
                                 queued when Event is not NULL.\r
   @retval EFI_SUCCESS           The transaction completed successfully when\r
                                 Event is NULL.\r
-  @retval EFI_ABORTED           The request did not complete because the driver\r
-                                binding Stop() routine was called.\r
   @retval EFI_BAD_BUFFER_SIZE   The RequestPacket->LengthInBytes value is too\r
                                 large.\r
   @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
@@ -1424,22 +1421,20 @@ I2cBusUnload (
                   &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