public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] SecurityPkg: Remove superfluous return statement
@ 2017-01-25  9:58 Thomas Huth
       [not found] ` <4A89E2EF3DFEDB4C8BFDE51014F606A14D6D630C@shsmsx102.ccr.corp.intel.com>
  2017-02-16  9:44 ` Thomas Huth
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Huth @ 2017-01-25  9:58 UTC (permalink / raw)
  To: edk2-devel; +Cc: Chao Zhang

If the code eventually returns "Status" anyway, it does not make
sense to explicitly return "Status" in case of an error, too.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalAhciMode.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalAhciMode.c b/SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalAhciMode.c
index 33f77bd..a95ea2f 100644
--- a/SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalAhciMode.c
+++ b/SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalAhciMode.c
@@ -1286,10 +1286,6 @@ AhciModeInitialize (
              EFI_TIMER_PERIOD_SECONDS(16)
              );
 
-  if (EFI_ERROR (Status)) {
-    return Status;
-  }
-
   return Status;
 }
 
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] SecurityPkg: Remove superfluous return statement
       [not found] ` <4A89E2EF3DFEDB4C8BFDE51014F606A14D6D630C@shsmsx102.ccr.corp.intel.com>
@ 2017-02-03  5:23   ` Zhang, Chao B
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Chao B @ 2017-02-03  5:23 UTC (permalink / raw)
  To: thuth@redhat.com, edk2-devel@ml01.01.org

Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Thomas Huth
Sent: Wednesday, January 25, 2017 5:59 PM
To: edk2-devel@ml01.01.org
Cc: Zhang, Chao B <chao.b.zhang@intel.com>
Subject: [edk2] [PATCH] SecurityPkg: Remove superfluous return statement

If the code eventually returns "Status" anyway, it does not make sense to explicitly return "Status" in case of an error, too.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalAhciMode.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalAhciMode.c b/SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalAhciMode.c
index 33f77bd..a95ea2f 100644
--- a/SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalAhciMode.c
+++ b/SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalAhciMode.c
@@ -1286,10 +1286,6 @@ AhciModeInitialize (
              EFI_TIMER_PERIOD_SECONDS(16)
              );
 
-  if (EFI_ERROR (Status)) {
-    return Status;
-  }
-
   return Status;
 }
 
--
1.8.3.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] SecurityPkg: Remove superfluous return statement
  2017-01-25  9:58 [PATCH] SecurityPkg: Remove superfluous return statement Thomas Huth
       [not found] ` <4A89E2EF3DFEDB4C8BFDE51014F606A14D6D630C@shsmsx102.ccr.corp.intel.com>
@ 2017-02-16  9:44 ` Thomas Huth
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2017-02-16  9:44 UTC (permalink / raw)
  To: edk2-devel; +Cc: Chao Zhang

On 25.01.2017 10:58, Thomas Huth wrote:
> If the code eventually returns "Status" anyway, it does not make
> sense to explicitly return "Status" in case of an error, too.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalAhciMode.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalAhciMode.c b/SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalAhciMode.c
> index 33f77bd..a95ea2f 100644
> --- a/SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalAhciMode.c
> +++ b/SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalAhciMode.c
> @@ -1286,10 +1286,6 @@ AhciModeInitialize (
>               EFI_TIMER_PERIOD_SECONDS(16)
>               );
>  
> -  if (EFI_ERROR (Status)) {
> -    return Status;
> -  }
> -
>    return Status;
>  }

Ping?



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-16  9:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-25  9:58 [PATCH] SecurityPkg: Remove superfluous return statement Thomas Huth
     [not found] ` <4A89E2EF3DFEDB4C8BFDE51014F606A14D6D630C@shsmsx102.ccr.corp.intel.com>
2017-02-03  5:23   ` Zhang, Chao B
2017-02-16  9:44 ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox