/** @file\r
Miscellaneous routines for 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
/**\r
Clean the iSCSI driver data.\r
\r
- @param[in] Private The iSCSI driver data.\r
+ @param[in] Private The iSCSI driver data.\r
+\r
+ @retval EFI_SUCCES The clean operation is successful.\r
+ @retval Others Other errors as indicated.\r
+\r
**/\r
-VOID\r
+EFI_STATUS\r
IScsiCleanDriverData (\r
IN ISCSI_DRIVER_DATA *Private\r
)\r
{\r
+ EFI_STATUS Status;\r
+\r
if (Private->DevicePath != NULL) {\r
- gBS->UninstallProtocolInterface (\r
- Private->ExtScsiPassThruHandle,\r
- &gEfiDevicePathProtocolGuid,\r
- Private->DevicePath\r
- );\r
+ Status = gBS->UninstallProtocolInterface (\r
+ Private->ExtScsiPassThruHandle,\r
+ &gEfiDevicePathProtocolGuid,\r
+ Private->DevicePath\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ goto EXIT;\r
+ }\r
\r
FreePool (Private->DevicePath);\r
}\r
\r
if (Private->ExtScsiPassThruHandle != NULL) {\r
- gBS->UninstallProtocolInterface (\r
- Private->ExtScsiPassThruHandle,\r
- &gEfiExtScsiPassThruProtocolGuid,\r
- &Private->IScsiExtScsiPassThru\r
- );\r
+ Status = gBS->UninstallProtocolInterface (\r
+ Private->ExtScsiPassThruHandle,\r
+ &gEfiExtScsiPassThruProtocolGuid,\r
+ &Private->IScsiExtScsiPassThru\r
+ );\r
}\r
\r
+EXIT:\r
+\r
gBS->CloseEvent (Private->ExitBootServiceEvent);\r
\r
FreePool (Private);\r
+ return Status;\r
}\r
\r
/**\r