Update code to avoid using potential NULL pointer.

Signed-off-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14999 6f19259b-4bc3-4df7-8a09-765794883524
Rollback the change to EFI_BOOT_KEY_DATA structure since UEFI Spec adds the clarification that bitfields are ordered such that bit 0 is the least significant bit.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15000 6f19259b-4bc3-4df7-8a09-765794883524
Merge branch 'master' of https://github.com/tianocore/edk2