45cfcd8 MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocol

1 file Authored by Amit Kumar 6 years ago, Committed by Star Zeng 6 years ago,
    MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocol
    
    Change since v3:
    1) Fixed issue when Attributes = EFI_OPEN_PROTOCOL_TEST_PROTOCOL
    and Inteface = NULL case. [Reported by:star.zeng at intel.com]
    
    Change Since v2:
    1) Modified to use EFI_ERROR to get status code
    
    Change since v1:
    1) Fixed typo protocal to protocol
    2) Fixed coding style
    
    Modified source code to update Interface as per spec.
    1) In case of Protocol is un-supported, interface should be returned NULL.
    2) In case of any error, interface should not be modified.
    3) In case of Test Protocol, interface is optional.
    
    Contributed-under: TianoCore Contribution Agreement 1.0
    Signed-off-by: Amit Kumar <amit.ak@samsung.com>
    Reviewed-by: Liming Gao <liming.gao@intel.com>
    Reviewed-by: Star Zeng <star.zeng@intel.com>