/** @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
\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
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
/** @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
/** @file\r
Miscellaneous definitions 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
-VOID\r
+EFI_STATUS\r
IScsiCleanDriverData (\r
IN ISCSI_DRIVER_DATA *Private\r
);\r