From: Jiaxin Wu <Jiaxin.wu@intel.com>
To: edk2-devel@lists.01.org
Cc: Michael Turner <Michael.Turner@microsoft.com>,
Ye Ting <ting.ye@intel.com>, Fu Siyuan <siyuan.fu@intel.com>,
Wu Jiaxin <jiaxin.wu@intel.com>
Subject: [PATCH v1 1/2] MdeModulePkg/Ip4Dxe: Uninstall protocols when error happen in Driver Binding Start.
Date: Sun, 3 Feb 2019 14:22:56 +0800 [thread overview]
Message-ID: <20190203062257.7128-2-Jiaxin.wu@intel.com> (raw)
In-Reply-To: <20190203062257.7128-1-Jiaxin.wu@intel.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1447
This patch is to uninstall Ip4ServiceBindingProtocol and Ip4Config2Protocol when
error happen in Driver Binding Start.
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Signed-off-by: Michael Turner <Michael.Turner@microsoft.com>
---
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c
index 0f25581414..87ec968e7b 100644
--- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c
+++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c
@@ -1,9 +1,9 @@
/** @file
The driver binding and service binding protocol for IP4 driver.
-Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2019, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -662,14 +662,17 @@ Ip4DriverBindingStart (
mIp4Id = (UINT16)NET_RANDOM (NetRandomInitSeed ());
return Status;
UNINSTALL_PROTOCOL:
- gBS->UninstallProtocolInterface (
+ gBS->UninstallMultipleProtocolInterfaces (
ControllerHandle,
&gEfiIp4ServiceBindingProtocolGuid,
- &IpSb->ServiceBinding
+ &IpSb->ServiceBinding,
+ &gEfiIp4Config2ProtocolGuid,
+ Ip4Cfg2,
+ NULL
);
FREE_SERVICE:
Ip4CleanService (IpSb);
FreePool (IpSb);
--
2.17.1.windows.2
next prev parent reply other threads:[~2019-02-03 6:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-03 6:22 [PATCH v1 0/2] Uninstall protocols when error happen in Driver Binding Start Jiaxin Wu
2019-02-03 6:22 ` Jiaxin Wu [this message]
2019-02-03 6:22 ` [PATCH v1 2/2] NetworkPkg/Ip6Dxe: " Jiaxin Wu
2019-02-11 2:58 ` [PATCH v1 0/2] " Ye, Ting
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190203062257.7128-2-Jiaxin.wu@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox