Skip to content

Commit

Permalink
[VP] fix coverity issue6
Browse files Browse the repository at this point in the history
fix coverity issue 6
  • Loading branch information
Dylan-debug authored and Sherry-Lin committed Sep 28, 2023
1 parent 0c25c16 commit 3f163b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,11 @@ MOS_STATUS SwFilterPipeFactory::Create(PVP_PIPELINE_PARAMS params, std::vector<S
VP_PUBLIC_CHK_STATUS_RETURN(Update(*tempParams, index));

SwFilterPipe *pipe = m_allocator.Create();
VP_PUBLIC_CHK_NULL_RETURN(pipe);
if (!pipe)
{
pipelineParamFactory->Destroy(tempParams);
VP_PUBLIC_CHK_STATUS_RETURN(MOS_STATUS_NULL_POINTER);
}

FeatureRule featureRule;
MOS_STATUS status = pipe->Initialize(*tempParams, featureRule);
Expand Down
2 changes: 1 addition & 1 deletion media_softlet/linux/common/ddi/media_libva_common_next.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ int32_t MediaLibvaCommonNext::GetGpuPriority(
if (updateSessionPriority)
{
*updatePriority = true;
if (priorityValue >= 0 && priorityValue <= CONTEXT_PRIORITY_MAX)
if (priorityValue <= CONTEXT_PRIORITY_MAX)
{
*priority = priorityValue - CONTEXT_PRIORITY_MAX / 2;
}
Expand Down
22 changes: 0 additions & 22 deletions media_softlet/linux/common/os/private/mos_os_specific.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1878,28 +1878,6 @@ MOS_STATUS Mos_Specific_GetIndirectStatePointer(
uint32_t offset = 0;
uint32_t size = 0;
return MosInterface::GetIndirectState(osInterface->osStreamState, indirectState, offset, size);

MOS_OS_CHK_NULL_RETURN(osInterface->pOsContext);

osContext = osInterface->pOsContext;

if (osInterface->CurrentGpuContextHandle == MOS_GPU_CONTEXT_INVALID_HANDLE)
{
MOS_OS_ASSERTMESSAGE("Invalid input parameter gpuContext.");
return MOS_STATUS_INVALID_PARAMETER;
}

MOS_OS_GPU_CONTEXT &osGpuContext = osContext->OsGpuContext[osInterface->CurrentGpuContextOrdinal];

MOS_OS_CHK_NULL_RETURN(osGpuContext.pCB);
MOS_OS_CHK_NULL_RETURN(osGpuContext.pCB->pCmdBase);

*indirectState =
(uint8_t*)osGpuContext.pCB->pCmdBase +
osGpuContext.uiCommandBufferSize -
osContext->uIndirectStateSize;

return MOS_STATUS_SUCCESS;
}

//!
Expand Down

0 comments on commit 3f163b1

Please sign in to comment.