mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 23:54:02 +02:00
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
|
/** @file
|
||||||
Implementation of driver entry point and driver binding protocol.
|
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
|
This program and the accompanying materials are licensed
|
||||||
and made available under the terms and conditions of the BSD License which
|
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
|
accompanies this distribution. The full text of the license may be found at
|
||||||
@ -258,7 +258,7 @@ Done:
|
|||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
@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
|
@retval other This driver does not support this device
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -698,11 +698,11 @@ SimpleNetworkDriverStart (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = mPciIo->FreeBuffer (
|
mPciIo->FreeBuffer (
|
||||||
mPciIo,
|
mPciIo,
|
||||||
SNP_MEM_PAGES (4096),
|
SNP_MEM_PAGES (4096),
|
||||||
Snp->Cpb
|
Snp->Cpb
|
||||||
);
|
);
|
||||||
|
|
||||||
Error_DeleteSNP:
|
Error_DeleteSNP:
|
||||||
|
|
||||||
@ -726,6 +726,13 @@ NiiError:
|
|||||||
Controller
|
Controller
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// If we got here that means we are in error state.
|
||||||
|
//
|
||||||
|
if (!EFI_ERROR (Status)) {
|
||||||
|
Status = EFI_DEVICE_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user