\r
Status = EFI_SUCCESS;\r
\r
+ //\r
+ // Check to make sure index is 1 (only 1 image for this device)\r
+ //\r
+ if (ImageIndex != 1) {\r
+ DEBUG ((DEBUG_ERROR, "FmpDxe: GetImage() - Image Index Invalid.\n"));\r
+ Status = EFI_INVALID_PARAMETER;\r
+ goto cleanup;\r
+ }\r
+\r
if ((ImageSize == NULL)) {\r
DEBUG ((DEBUG_ERROR, "FmpDxe: GetImage() - ImageSize Pointer Parameter is NULL.\n"));\r
Status = EFI_INVALID_PARAMETER;\r
goto cleanup;\r
}\r
\r
- //\r
- // Check to make sure index is 1 (only 1 image for this device)\r
- //\r
- if (ImageIndex != 1) {\r
- DEBUG ((DEBUG_ERROR, "FmpDxe: GetImage() - Image Index Invalid.\n"));\r
- Status = EFI_INVALID_PARAMETER;\r
- goto cleanup;\r
- }\r
-\r
-\r
Status = FmpDeviceGetImage (Image, ImageSize);\r
cleanup:\r
\r