From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mx.groups.io with SMTP id smtpd.web10.31832.1676942462340928625 for ; Mon, 20 Feb 2023 17:21:02 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: huawei.com, ip: 45.249.212.255, mailfrom: xiewenyi2@huawei.com) Received: from kwepemm600004.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4PLLyb72FLz16Njv; Tue, 21 Feb 2023 09:18:31 +0800 (CST) Received: from kwephisprg16640.huawei.com (10.247.83.252) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Tue, 21 Feb 2023 09:20:59 +0800 From: "wenyi,xie" To: , , , CC: , Subject: [PATCH EDK2 v1 1/1] MdeModulePkg/VariablePolicyLib: Remove status checking Date: Tue, 21 Feb 2023 09:20:48 +0800 Message-ID: <20230221012048.2497416-2-xiewenyi2@huawei.com> X-Mailer: git-send-email 2.18.0.huawei.25 In-Reply-To: <20230221012048.2497416-1-xiewenyi2@huawei.com> References: <20230221012048.2497416-1-xiewenyi2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.247.83.252] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600004.china.huawei.com (7.193.23.242) X-CFilter-Loop: Reflected Content-Type: text/plain Removing status checking as the status is always EFI_SUCCESS. No functional change. Cc: Jian J Wang Cc: Liming Gao Cc: Hao A Wu Signed-off-by: Wenyi Xie --- MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c b/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c index 82dae67ef50f..fbc192c6ab26 100644 --- a/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c +++ b/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c @@ -782,9 +782,7 @@ InitVariablePolicyLib ( return EFI_ALREADY_STARTED; } - if (!EFI_ERROR (Status)) { - Status = VariablePolicyExtraInit (); - } + Status = VariablePolicyExtraInit (); if (!EFI_ERROR (Status)) { // Save an internal pointer to the GetVariableHelper. @@ -841,9 +839,7 @@ DeinitVariablePolicyLib ( return EFI_NOT_READY; } - if (!EFI_ERROR (Status)) { - Status = VariablePolicyExtraDeinit (); - } + Status = VariablePolicyExtraDeinit (); if (!EFI_ERROR (Status)) { mGetVariableHelper = NULL; -- 2.20.1.windows.1