public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Jiaxin Wu <jiaxin.wu@intel.com>, edk2-devel@ml01.01.org
Cc: Ye Ting <ting.ye@intel.com>, Fu Siyuan <siyuan.fu@intel.com>,
	Santhapur Naveen <naveens@amiindia.co.in>
Subject: Re: [PATCH v2 2/2] MdeModulePkg/Ip4Dxe: Correct the return status
Date: Fri, 11 Nov 2016 13:45:08 +0100	[thread overview]
Message-ID: <c183e04d-6f43-c518-17d7-9ab0241afb7f@redhat.com> (raw)
In-Reply-To: <1478841521-232036-3-git-send-email-jiaxin.wu@intel.com>

On 11/11/16 06:18, Jiaxin Wu wrote:
> This patch made the following change:
> * DataItem->Status should be updated to the status code.
> * Data should not be freed if EFI_NOT_READY returned.
> 
> Cc: Santhapur Naveen <naveens@amiindia.co.in>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ye Ting <ting.ye@intel.com>
> Cc: Fu Siyuan <siyuan.fu@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
> ---
>  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
> index 5b01b35..88ead9d 100644
> --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
> +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
> @@ -1280,25 +1280,21 @@ Ip4Config2SetMaunualAddress (
>    DataItem->DataSize = DataSize;
>    DataItem->Status   = EFI_NOT_READY;
>  
>    IpSb->Reconfig = TRUE;
>    Status = Ip4Config2SetDefaultAddr (IpSb, StationAddress, SubnetMask);
> -  if (EFI_ERROR (Status)) {
> -    goto ON_EXIT;
> -  }  
>  
> -  DataItem->Status = EFI_SUCCESS;   
> +  DataItem->Status = Status; 
>  
> -ON_EXIT:
> -  if (EFI_ERROR (DataItem->Status)) {
> +  if (EFI_ERROR (DataItem->Status) && DataItem->Status != EFI_NOT_READY) {
>      if (Ptr != NULL) {
>        FreePool (Ptr);
>      }
>      DataItem->Data.Ptr = NULL; 
>    }
>  
> -  return EFI_SUCCESS;
> +  return Status;
>  }
>  
>  /**
>    The work function is to set the gateway addresses manually for the EFI IPv4 
>    network stack that is running on the communication device that this EFI IPv4 
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>


      reply	other threads:[~2016-11-11 12:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-11  5:18 [PATCH v2 0/2] MdeModulePkg/Ip4Dxe: Issue fix for Ip4Dxe Jiaxin Wu
2016-11-11  5:18 ` [PATCH v2 1/2] MdeModulePkg/Ip4Dxe: Add wrong/invalid subnet check Jiaxin Wu
2016-11-11 12:42   ` Laszlo Ersek
2016-11-14  6:51   ` Ye, Ting
2016-11-14  7:00     ` Wu, Jiaxin
2016-11-14  7:16       ` Ye, Ting
2016-11-11  5:18 ` [PATCH v2 2/2] MdeModulePkg/Ip4Dxe: Correct the return status Jiaxin Wu
2016-11-11 12:45   ` Laszlo Ersek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c183e04d-6f43-c518-17d7-9ab0241afb7f@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox