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 E09EE81E81 for ; Thu, 19 Jan 2017 01:41:35 -0800 (PST) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (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 7730A15567; Thu, 19 Jan 2017 09:41:36 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-25.phx2.redhat.com [10.3.116.25]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0J9fYlI028322; Thu, 19 Jan 2017 04:41:35 -0500 To: Thomas Huth , edk2-devel@ml01.01.org References: <1484817457-20169-1-git-send-email-thuth@redhat.com> Cc: Jordan Justen From: Laszlo Ersek Message-ID: Date: Thu, 19 Jan 2017 10:41:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1484817457-20169-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 19 Jan 2017 09:41:36 +0000 (UTC) Subject: Re: [PATCH] OvmfPkg: 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 09:41:36 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 01/19/17 10:17, Thomas Huth wrote: > If the code eventually returns "Status" anyway, it does not make > sense to explicitely return "Status" in case of an error, too. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Thomas Huth > --- > OvmfPkg/Library/NvVarsFileLib/FsAccess.c | 3 --- > OvmfPkg/XenBusDxe/XenStore.c | 3 --- > 2 files changed, 6 deletions(-) > > diff --git a/OvmfPkg/Library/NvVarsFileLib/FsAccess.c b/OvmfPkg/Library/NvVarsFileLib/FsAccess.c > index 826901f..cd0bfff 100644 > --- a/OvmfPkg/Library/NvVarsFileLib/FsAccess.c > +++ b/OvmfPkg/Library/NvVarsFileLib/FsAccess.c > @@ -77,9 +77,6 @@ GetNvVarsFile ( > ), > 0 > ); > - if (EFI_ERROR (Status)) { > - return Status; > - } > > return Status; > } > diff --git a/OvmfPkg/XenBusDxe/XenStore.c b/OvmfPkg/XenBusDxe/XenStore.c > index 1666c4b..76b6e29 100644 > --- a/OvmfPkg/XenBusDxe/XenStore.c > +++ b/OvmfPkg/XenBusDxe/XenStore.c > @@ -1075,9 +1075,6 @@ XenStoreInit ( > > /* Initialize the shared memory rings to talk to xenstored */ > Status = XenStoreInitComms (&xs); > - if (EFI_ERROR (Status)) { > - return Status; > - } > > return Status; > } > Reviewed-by: Laszlo Ersek Pushed as commit 19ca06bb84ca. Thanks! Laszlo