From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 92FB481E84 for ; Thu, 19 Jan 2017 02:16:05 -0800 (PST) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3040C76EC; Thu, 19 Jan 2017 10:16:06 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-76.ams2.redhat.com [10.36.116.76]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0JAG4co017670; Thu, 19 Jan 2017 05:16:05 -0500 From: Thomas Huth To: edk2-devel@ml01.01.org Cc: Feng Tian , Star Zeng Date: Thu, 19 Jan 2017 11:16:04 +0100 Message-Id: <1484820964-30276-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 19 Jan 2017 10:16:06 +0000 (UTC) Subject: [PATCH] MdeModulePkg: Remove superfluous return statements X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jan 2017 10:16:05 -0000 If the code eventually returns "Status" anyway, it does not make sense to explicitely return "Status" in case of an error, too. (this patch has been created with Coccinelle) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Huth --- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c | 3 --- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c | 3 --- MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.c | 3 --- MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c | 3 --- 4 files changed, 12 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c index 51cff3c..ad6cdb1 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c @@ -1046,9 +1046,6 @@ NvmeControllerInit ( // One for blocking I/O, one for non-blocking I/O. // Status = NvmeCreateIoSubmissionQueue (Private); - if (EFI_ERROR(Status)) { - return Status; - } return Status; } diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c index 3f73194..9dbec10 100755 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c @@ -783,9 +783,6 @@ EmmcSwitchToHighSpeed ( HsTiming = 1; Status = EmmcSwitchClockFreq (PciIo, PassThru, Slot, Rca, HsTiming, ClockFreq); - if (EFI_ERROR (Status)) { - return Status; - } return Status; } diff --git a/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.c b/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.c index d6d3bdb..5a9e0b2 100644 --- a/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.c +++ b/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.c @@ -2520,9 +2520,6 @@ EmmcPeimSwitchToHighSpeed ( HsTiming = 1; Status = EmmcPeimSwitchClockFreq (Slot, Rca, HsTiming, ClockFreq); - if (EFI_ERROR (Status)) { - return Status; - } return Status; } diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c index 7ef141f..01bec19 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c @@ -1465,9 +1465,6 @@ ConSplitterStdErrDriverBindingStart ( // Status = ConSplitterTextOutAddDevice (&mStdErr, TextOut, NULL, NULL); ConSplitterTextOutSetAttribute (&mStdErr.TextOut, EFI_TEXT_ATTR (EFI_MAGENTA, EFI_BLACK)); - if (EFI_ERROR (Status)) { - return Status; - } return Status; } -- 1.8.3.1