X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FNetwork%2FSnpDxe%2FSnp.c;fp=MdeModulePkg%2FUniversal%2FNetwork%2FSnpDxe%2FSnp.c;h=177d0a913dfecb5f6354c2170e526ba958b3c247;hp=f1fea0cff44f923fef3e3330bacbfd016198d7a2;hb=469462b109d4344df8b4c5cc4a672100998b43a0;hpb=a412ad88e5737735ab54b35392b51d8a210c3b74 diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Snp.c b/MdeModulePkg/Universal/Network/SnpDxe/Snp.c index f1fea0cff4..177d0a913d 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Snp.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/Snp.c @@ -1,7 +1,7 @@ /** @file Implementation of driver entry point and driver binding protocol. -Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.
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 @@ -258,7 +258,7 @@ Done: device to start. @retval EFI_SUCCESS This driver is added to ControllerHandle - @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle + @retval EFI_DEVICE_ERROR This driver could not be started due to a device error @retval other This driver does not support this device **/ @@ -698,11 +698,11 @@ SimpleNetworkDriverStart ( return Status; } - Status = mPciIo->FreeBuffer ( - mPciIo, - SNP_MEM_PAGES (4096), - Snp->Cpb - ); + mPciIo->FreeBuffer ( + mPciIo, + SNP_MEM_PAGES (4096), + Snp->Cpb + ); Error_DeleteSNP: @@ -726,6 +726,13 @@ NiiError: Controller ); + // + // If we got here that means we are in error state. + // + if (!EFI_ERROR (Status)) { + Status = EFI_DEVICE_ERROR; + } + return Status; }