/** @file\r
This implementation of EFI_PXE_BASE_CODE_PROTOCOL and EFI_LOAD_FILE_PROTOCOL.\r
\r
- Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
EFI_STATUS Status;\r
EFI_STATUS MediaStatus;\r
\r
- if (FilePath == NULL || !IsDevicePathEnd (FilePath)) {\r
+ if (This == NULL || BufferSize == NULL || FilePath == NULL || !IsDevicePathEnd (FilePath)) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- VirtualNic = PXEBC_VIRTUAL_NIC_FROM_LOADFILE (This);\r
- Private = VirtualNic->Private;\r
- PxeBc = &Private->PxeBc;\r
- UsingIpv6 = FALSE;\r
- Status = EFI_DEVICE_ERROR;\r
-\r
- if (This == NULL || BufferSize == NULL) {\r
- return EFI_INVALID_PARAMETER;\r
- }\r
-\r
//\r
// Only support BootPolicy\r
//\r
if (!BootPolicy) {\r
return EFI_UNSUPPORTED;\r
}\r
+ \r
+ VirtualNic = PXEBC_VIRTUAL_NIC_FROM_LOADFILE (This);\r
+ Private = VirtualNic->Private;\r
+ PxeBc = &Private->PxeBc;\r
+ UsingIpv6 = FALSE;\r
+ Status = EFI_DEVICE_ERROR;\r
\r
//\r
// Check media status before PXE start\r