mirror of https://github.com/acidanthera/audk.git
Fix a bug in snp driver binding Start() that it may return incorrect status code.
Signed-off-by: Ari Zigler <ariz@mellanox.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14115 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
a412ad88e5
commit
469462b109
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Implementation of driver entry point and driver binding protocol.
|
||||
|
||||
Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue