Skip to content

Commit

Permalink
[CM] Fix some coverity issue
Browse files Browse the repository at this point in the history
Add nullptr check
Remove dead logic code
  • Loading branch information
XuanJessica authored and intel-mediadev committed Oct 20, 2023
1 parent 1127818 commit c0e84d1
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions media_driver/agnostic/common/cm/cm_queue_rt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2308,6 +2308,7 @@ void BufferCopyThread(void* threadData)
CmEvent* wait_event = (CmEvent*)(data->wait_event);
CmEvent* notify_event = (CmEvent*)(data->event);
CmEventRT* eventRT = dynamic_cast<CmEventRT*>(notify_event);
CM_CHK_NULL_RETURN_VOID(eventRT);
CmEventEx* eex = dynamic_cast<CmEventEx*>(notify_event);

uint32_t offset = data->offset;
Expand Down Expand Up @@ -2470,15 +2471,6 @@ int32_t CmQueueRT::EnqueueBufferCopy(CmBuffer* buffer, size_t offset, const unsi
CM_CHK_NULL_GOTOFINISH_CMERROR(task);
CM_CHK_CMSTATUS_GOTOFINISH(task->AddKernel(kernel));

if (option & CM_FASTCOPY_OPTION_DISABLE_TURBO_BOOST)
{
// disable turbo
CM_TASK_CONFIG taskConfig;
CmSafeMemSet(&taskConfig, 0, sizeof(CM_TASK_CONFIG));
taskConfig.turboBoostFlag = CM_TURBO_BOOST_DISABLE;
task->SetProperty(taskConfig);
}

CM_CHK_CMSTATUS_GOTOFINISH(EnqueueFast(task, event, threadSpace));
}

Expand Down

0 comments on commit c0e84d1

Please sign in to comment.