public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] OptionRomPkg: Remove superfluous return statement
@ 2017-01-25 10:01 Thomas Huth
  2017-01-26  2:41 ` Ni, Ruiyu
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Huth @ 2017-01-25 10:01 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ruiyu Ni

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>
---
 OptionRomPkg/Bus/Usb/FtdiUsbSerialDxe/FtdiUsbSerialDriver.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/OptionRomPkg/Bus/Usb/FtdiUsbSerialDxe/FtdiUsbSerialDriver.c b/OptionRomPkg/Bus/Usb/FtdiUsbSerialDxe/FtdiUsbSerialDriver.c
index c03606b..1eceb23 100644
--- a/OptionRomPkg/Bus/Usb/FtdiUsbSerialDxe/FtdiUsbSerialDriver.c
+++ b/OptionRomPkg/Bus/Usb/FtdiUsbSerialDxe/FtdiUsbSerialDriver.c
@@ -2404,9 +2404,6 @@ SetAttributes (
              DataBits,
              StopBits
              );
-  if (EFI_ERROR (Status)) {
-    return Status;
-  }
 
   return Status;
 }
-- 
1.8.3.1



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

* Re: [PATCH] OptionRomPkg: Remove superfluous return statement
  2017-01-25 10:01 [PATCH] OptionRomPkg: Remove superfluous return statement Thomas Huth
@ 2017-01-26  2:41 ` Ni, Ruiyu
  0 siblings, 0 replies; 2+ messages in thread
From: Ni, Ruiyu @ 2017-01-26  2:41 UTC (permalink / raw)
  To: Thomas Huth, edk2-devel@ml01.01.org

Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

Thanks/Ray

> -----Original Message-----
> From: Thomas Huth [mailto:thuth@redhat.com]
> Sent: Wednesday, January 25, 2017 6:02 PM
> To: edk2-devel@ml01.01.org
> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>
> Subject: [PATCH] OptionRomPkg: 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>
> ---
>  OptionRomPkg/Bus/Usb/FtdiUsbSerialDxe/FtdiUsbSerialDriver.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/OptionRomPkg/Bus/Usb/FtdiUsbSerialDxe/FtdiUsbSerialDriver.c
> b/OptionRomPkg/Bus/Usb/FtdiUsbSerialDxe/FtdiUsbSerialDriver.c
> index c03606b..1eceb23 100644
> --- a/OptionRomPkg/Bus/Usb/FtdiUsbSerialDxe/FtdiUsbSerialDriver.c
> +++ b/OptionRomPkg/Bus/Usb/FtdiUsbSerialDxe/FtdiUsbSerialDriver.c
> @@ -2404,9 +2404,6 @@ SetAttributes (
>               DataBits,
>               StopBits
>               );
> -  if (EFI_ERROR (Status)) {
> -    return Status;
> -  }
> 
>    return Status;
>  }
> --
> 1.8.3.1



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

end of thread, other threads:[~2017-01-26  2:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-25 10:01 [PATCH] OptionRomPkg: Remove superfluous return statement Thomas Huth
2017-01-26  2:41 ` Ni, Ruiyu

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