]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c
MdeModulePkg: refine codes of iSCSI driver.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / IScsiDriver.c
index e55bee8af94d0e25d399f3dd42e8303da8e291c0..5295d346ec26404bf5474ac4ac8e23e037babcc1 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The entry point of IScsi driver.\r
 \r
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2016, 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
@@ -339,6 +339,10 @@ ON_ERROR:
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
   @retval EFI_DEVICE_ERROR      The device could not be stopped due to a device error.\r
+  @retval EFI_INVALID_PARAMETER Child handle is NULL.\r
+  @retval EFI_ACCESS_DENIED     The protocol could not be removed from the Handle\r
+                                because its interfaces are being used.\r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -451,7 +455,10 @@ IScsiDriverBindingStop (
   IScsiPublishIbft ();\r
 \r
   IScsiSessionAbort (&Private->Session);\r
-  IScsiCleanDriverData (Private);\r
+  Status = IScsiCleanDriverData (Private);\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
 \r
   return EFI_SUCCESS;\r
 }\r