b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
@@ -940,22 +940,21 @@ Ip4StartAutoConfig (
&Instance->Dhcp4Handle
);
- if (Status == EFI_UNSUPPORTED) {
- //
- // No DHCPv4 Service Binding protocol, register a notify.
- //
- if (Instance->Dhcp4SbNotifyEvent == NULL) {
- Instance->Dhcp4SbNotifyEvent = EfiCreateProtocolNotifyEvent (
- &gEfiDhcp4ServiceBindingProtocolGuid,
- TPL_CALLBACK,
- Ip4Config2OnDhcp4SbInstalled,
- (VOID *) Instance,
- &Instance->Registration
- );
- }
- }
-
if (EFI_ERROR (Status)) {
+ if (Status == EFI_UNSUPPORTED) {^M
+ //^M
+ // No DHCPv4 Service Binding protocol, register a notify.^M
+ //^M
+ if (Instance->Dhcp4SbNotifyEvent == NULL) {^M
+ Instance->Dhcp4SbNotifyEvent = EfiCreateProtocolNotifyEvent (^M
+
&gEfiDhcp4ServiceBindingProtocolGuid,^M
+ TPL_CALLBACK,^M
+ Ip4Config2OnDhcp4SbInstalled,^M
+ (VOID *) Instance,^M
+ &Instance->Registration^M
+ );^M
+ }^M
+ }^M
return Status;
}