Skip to content

Commit

Permalink
[Media Common] [VP] fix coverity 21
Browse files Browse the repository at this point in the history
fix check status return
  • Loading branch information
Dylan-debug authored and intel-mediadev committed Dec 27, 2023
1 parent 7a85051 commit 032b64e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ MOS_STATUS VeboxCopyState::CopyMainSurface(PMOS_RESOURCE src, PMOS_RESOURCE dst)
// Get input resource info
MOS_ZeroMemory(&inputSurface, sizeof(MOS_SURFACE));
inputSurface.OsResource = *src;
GetResourceInfo(&inputSurface);
VEBOX_COPY_CHK_STATUS_RETURN(GetResourceInfo(&inputSurface));

// Get output resource info
MOS_ZeroMemory(&outputSurface, sizeof(MOS_SURFACE));
outputSurface.OsResource = *dst;
GetResourceInfo(&outputSurface);
VEBOX_COPY_CHK_STATUS_RETURN(GetResourceInfo(&outputSurface));

if (!IsFormatSupported(&inputSurface))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ MOS_STATUS MediaMemDeCompNext_Xe_Lpm_Plus_Base::ReAllocateLinearSurface(PMOS_SUR

// Pre-set to get surface info
pSurface->Format = format;
GetResourceInfo(pSurface);
VPHAL_MEMORY_DECOMP_CHK_STATUS_RETURN(GetResourceInfo(pSurface));
*pbAllocated = true;

return eStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,12 @@ void* GraphicsResourceSpecificNext::LockExternalResource(
resource->pGmmResInfo->IsMediaMemoryCompressed(0)))
{
MosDecompression *mosDecompression = nullptr;
MosInterface::GetMosDecompressionFromStreamState(streamState, mosDecompression);
MOS_STATUS status = MosInterface::GetMosDecompressionFromStreamState(streamState, mosDecompression);
if (status != MOS_STATUS_SUCCESS)
{
MOS_OS_ASSERTMESSAGE("Get Mos Decompression From StreamState failed, skip lock");
return nullptr;
}
if (nullptr == mosDecompression)
{
MOS_OS_ASSERTMESSAGE("mosDecompression is NULL.");
Expand Down

0 comments on commit 032b64e

Please sign in to comment.