for (Index = 0; Index < sizeof(mTpmInstanceId)/sizeof(mTpmInstanceId[0]); Index++) {\r
if (TpmDevice == mTpmInstanceId[Index].TpmDevice) {\r
Size = sizeof(mTpmInstanceId[Index].TpmInstanceGuid);\r
- PcdSetPtr (PcdTpmInstanceGuid, &Size, &mTpmInstanceId[Index].TpmInstanceGuid);\r
+ Status = PcdSetPtrS (PcdTpmInstanceGuid, &Size, &mTpmInstanceId[Index].TpmInstanceGuid);\r
+ ASSERT_EFI_ERROR (Status);\r
DEBUG ((EFI_D_INFO, "TpmDevice PCD: %g\n", &mTpmInstanceId[Index].TpmInstanceGuid));\r
break;\r
}\r