From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=siyuan.fu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 0335C2208588E for ; Thu, 21 Dec 2017 22:09:12 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Dec 2017 22:14:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,439,1508828400"; d="scan'208";a="186275104" Received: from sfu5-mobl.ccr.corp.intel.com ([10.239.192.229]) by orsmga005.jf.intel.com with ESMTP; 21 Dec 2017 22:14:00 -0800 From: Fu Siyuan To: edk2-devel@lists.01.org Cc: Ye Ting , Wu Jiaxin , Wang Fan Date: Fri, 22 Dec 2017 14:13:57 +0800 Message-Id: <20171222061357.16916-1-siyuan.fu@intel.com> X-Mailer: git-send-email 2.13.0.windows.1 Subject: [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 06:09:13 -0000 This patch updates the constructor of DpcLib to return error if failed to locate 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 = gBS->LocateProtocol (&gEfiDpcProtocolGuid, NULL, (VOID **)&mDpc); ASSERT_EFI_ERROR (Status); - return EFI_SUCCESS; + return Status; } /** -- 2.13.0.windows.1