Do not validate platform for add comment call.

Change-Id: I1f4c28541aea8e13ac1a63511acb5528b3047fe5
Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
This commit is contained in:
Mrozek, Michal
2019-04-10 16:01:49 +02:00
committed by sys_ocldev
parent 0283f7ad13
commit a21f921dcf
2 changed files with 9 additions and 18 deletions

View File

@@ -4238,20 +4238,16 @@ cl_int CL_API_CALL clAddCommentINTEL(cl_platform_id platform, const char *commen
API_ENTER(&retVal);
DBG_LOG_INPUTS("platform", platform, "comment", comment);
Platform *pPlatform = nullptr;
retVal = validateObjects(WithCastToInternal(platform, &pPlatform));
auto executionEnvironment = ::platform()->peekExecutionEnvironment();
auto aubCenter = executionEnvironment->aubCenter.get();
if (retVal == CL_SUCCESS) {
auto executionEnvironment = pPlatform->peekExecutionEnvironment();
auto aubCenter = executionEnvironment->aubCenter.get();
if (!comment || (aubCenter && !aubCenter->getAubManager())) {
retVal = CL_INVALID_VALUE;
}
if (retVal == CL_SUCCESS && aubCenter) {
aubCenter->getAubManager()->addComment(comment);
}
if (!comment || (aubCenter && !aubCenter->getAubManager())) {
retVal = CL_INVALID_VALUE;
}
if (retVal == CL_SUCCESS && aubCenter) {
aubCenter->getAubManager()->addComment(comment);
}
return retVal;
}