diff mbox

Fix checking of return value of NorFlashWriteBlocks().

Message ID 1382060644-18479-1-git-send-email-roy.franz@linaro.org
State New
Headers show

Commit Message

Roy Franz Oct. 18, 2013, 1:44 a.m. UTC
Signed-off-by: Roy Franz <roy.franz@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
---
 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Olivier Martin Oct. 21, 2013, 10:30 a.m. UTC | #1
Thanks Roy for the contribution, your patch has been pushed into revision
14792.

> -----Original Message-----
> From: Roy Franz [mailto:roy.franz@linaro.org]
> Sent: 18 October 2013 02:44
> To: edk2-devel@lists.sourceforge.net; linaro-uefi-internal@linaro.org
> Cc: patches@linaro.org; Roy Franz
> Subject: [linaro-uefi-internal] [PATCH] Fix checking of return value of
> NorFlashWriteBlocks().
> 
> Signed-off-by: Roy Franz <roy.franz@linaro.org>
> Contributed-under: TianoCore Contribution Agreement 1.0
> ---
>  ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c
> b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c
> index ab6304b..4b56f2a 100644
> --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c
> +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c
> @@ -608,7 +608,7 @@ FvbWrite (
>    CopyMem((BlockBuffer + Offset), Buffer, *NumBytes);
> 
>    // Write the modified buffer back to the NorFlash
> -  Status = NorFlashWriteBlocks (Instance, Instance->StartLba + Lba,
> BlockSize, BlockBuffer);
> +  TempStatus = NorFlashWriteBlocks (Instance, Instance->StartLba +
> Lba, BlockSize, BlockBuffer);
>    if (EFI_ERROR (TempStatus)) {
>      // Return one of the pre-approved error statuses
>      Status = EFI_DEVICE_ERROR;
> --
> 1.7.10.4
> 
> To unsubscribe from this group and stop receiving emails from it, send
> an email to linaro-uefi-internal+unsubscribe@linaro.org.
diff mbox

Patch

diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c
index ab6304b..4b56f2a 100644
--- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c
+++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c
@@ -608,7 +608,7 @@  FvbWrite (
   CopyMem((BlockBuffer + Offset), Buffer, *NumBytes);
 
   // Write the modified buffer back to the NorFlash
-  Status = NorFlashWriteBlocks (Instance, Instance->StartLba + Lba, BlockSize, BlockBuffer);
+  TempStatus = NorFlashWriteBlocks (Instance, Instance->StartLba + Lba, BlockSize, BlockBuffer);
   if (EFI_ERROR (TempStatus)) {
     // Return one of the pre-approved error statuses
     Status = EFI_DEVICE_ERROR;