From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=fan.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 A22FE222CB302 for ; Thu, 21 Dec 2017 23:25:40 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Dec 2017 23:30:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,439,1508828400"; d="scan'208";a="4877123" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga006.jf.intel.com with ESMTP; 21 Dec 2017 23:30:29 -0800 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 21 Dec 2017 23:30:29 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 21 Dec 2017 23:30:29 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by shsmsx102.ccr.corp.intel.com ([169.254.2.189]) with mapi id 14.03.0319.002; Fri, 22 Dec 2017 15:30:27 +0800 From: "Wang, Fan" To: "Fu, Siyuan" , "edk2-devel@lists.01.org" CC: "Ye, Ting" , "Wu, Jiaxin" Thread-Topic: [Patch] MdeModulePkg/DpcLib: return error if failed to locate DPC protocol. Thread-Index: AQHTeuwVwoltilz5vUyc2aF6r/DkzqNO932Q Date: Fri, 22 Dec 2017 07:30:27 +0000 Message-ID: References: <20171222061357.16916-1-siyuan.fu@intel.com> In-Reply-To: <20171222061357.16916-1-siyuan.fu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] MdeModulePkg/DpcLib: return error if failed to locate DPC protocol. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2017 07:25:41 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed by Wang, Fan -----Original Message----- From: Fu, Siyuan=20 Sent: Friday, December 22, 2017 2:14 PM To: edk2-devel@lists.01.org Cc: Ye, Ting ; Wu, Jiaxin ; Wang, F= an Subject: [Patch] MdeModulePkg/DpcLib: return error if failed to locate DPC = protocol. This patch updates the constructor of DpcLib to return error if failed to l= ocate DPC protocol. Cc: Ye Ting Cc: Wu Jiaxin Cc: Wang Fan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan --- MdeModulePkg/Library/DxeDpcLib/DpcLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/DxeDpcLib/DpcLib.c b/MdeModulePkg/Library= /DxeDpcLib/DpcLib.c index 6eda8ca0fb..ddc3e0adda 100644 --- a/MdeModulePkg/Library/DxeDpcLib/DpcLib.c +++ b/MdeModulePkg/Library/DxeDpcLib/DpcLib.c @@ -45,7 +45,7 @@ DpcLibConstructor ( Status =3D gBS->LocateProtocol (&gEfiDpcProtocolGuid, NULL, (VOID **)&mD= pc); ASSERT_EFI_ERROR (Status); =20 - return EFI_SUCCESS; + return Status; } =20 /** -- 2.13.0.windows.1