Skip to content

Commit

Permalink
[Decode] Fix logically dead code issue of coverity
Browse files Browse the repository at this point in the history
Clean some logically dead code
  • Loading branch information
XuanJessica authored and intel-mediadev committed Sep 21, 2023
1 parent c8562a4 commit da3ac7d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
6 changes: 0 additions & 6 deletions media_driver/agnostic/common/cm/cm_device_rt_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1893,12 +1893,6 @@ CmDeviceRTBase::CreateVmeSurfaceG7_5(CmSurface2D* curSurface,
CmSurface2DRT** forward = nullptr;
CmSurface2DRT** backward = nullptr;

if( ! currentRT )
{
CM_ASSERTMESSAGE("Error: Pointer to current surface is null.");
return CM_INVALID_ARG_VALUE;
}

if(forwardSurfaces != nullptr)
{
forward = MOS_NewArray( CmSurface2DRT*, forwardSurfaceCount);
Expand Down
10 changes: 0 additions & 10 deletions media_driver/agnostic/common/cm/cm_kernel_rt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -960,11 +960,6 @@ CmSurface* CmKernelRT::GetSurfaceFromSurfaceArray( SurfaceIndex* value, uint32_t
m_surfaceMgr->GetSurface(surfaceIndex->get_data(), surface);

finish:
if(hr != CM_SUCCESS)
{
surface = nullptr;
}

return surface;
}

Expand Down Expand Up @@ -1975,11 +1970,6 @@ int32_t CmKernelRT::SetArgsInternal( CM_KERNEL_INTERNAL_ARG_TYPE nArgType, uint3
return CM_OUT_OF_HOST_MEMORY;
}
CmSafeMemSet((void *)arg.surfIndex, 0, size/sizeof(int32_t) * sizeof(uint16_t));
if( surfIndexValue == nullptr )
{
CM_ASSERTMESSAGE("Error: Pointer to surface index value is null.");
return CM_NULL_POINTER;
}
CmSafeMemCopy((void *)arg.surfIndex, surfIndexValue, size / sizeof(int32_t) * sizeof(uint16_t));
}

Expand Down
5 changes: 0 additions & 5 deletions media_driver/agnostic/common/cm/cm_queue_rt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -904,11 +904,6 @@ CM_RT_API int32_t CmQueueRT::EnqueueWithGroup( CmTask* task, CmEvent* & event, c
}

CmTaskRT *taskRT = static_cast<CmTaskRT *>(task);
if(taskRT == nullptr)
{
CM_ASSERTMESSAGE("Error: Kernel array is NULL.");
return CM_NULL_POINTER;
}
uint32_t count = 0;
count = taskRT->GetKernelCount();

Expand Down

0 comments on commit da3ac7d

Please sign in to comment.