Skip to content

Commit

Permalink
[CP] Fix some potential Coverity issues
Browse files Browse the repository at this point in the history
Fix some potential Coverity issues of unchecked return value.
  • Loading branch information
TaoZhou-intel authored and intel-mediadev committed Jul 29, 2024
1 parent fa13cd3 commit 72fe318
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 12 deletions.
5 changes: 2 additions & 3 deletions media_driver/agnostic/common/hw/vdbox/mhw_vdbox_hcp_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -961,12 +961,11 @@ class MhwVdboxHcpInterfaceGeneric : public MhwVdboxHcpInterface
sliceInfoParam.dwDataLength[0] = hevcSliceState->pHevcSliceParams->slice_data_size;
sliceInfoParam.dwDataLength[1] = hevcSliceState->pHevcSliceParams->slice_data_size;

m_cpInterface->SetHcpProtectionState(
MHW_MI_CHK_STATUS(m_cpInterface->SetHcpProtectionState(
true,
cmdBuffer,
nullptr,
&sliceInfoParam
);
&sliceInfoParam));

return eStatus;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ MOS_STATUS AvcPipelineM12::Initialize(void *settings)
m_decodecp = Create_DecodeCpInterface(codecSettings, m_hwInterface->GetCpInterface(), m_hwInterface->GetOsInterface());
if (m_decodecp)
{
m_decodecp->RegisterParams(codecSettings);
DECODE_CHK_STATUS(m_decodecp->RegisterParams(codecSettings));
}
DECODE_CHK_STATUS(CreateFeatureManager());
DECODE_CHK_STATUS(m_featureManager->Init(codecSettings));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ MOS_STATUS HevcPipelineM12::Initialize(void *settings)
m_decodecp = Create_DecodeCpInterface(codecSettings, m_hwInterface->GetCpInterface(), m_hwInterface->GetOsInterface());
if (m_decodecp)
{
m_decodecp->RegisterParams(codecSettings);
DECODE_CHK_STATUS(m_decodecp->RegisterParams(codecSettings));
}
DECODE_CHK_STATUS(CreateFeatureManager());
DECODE_CHK_STATUS(m_featureManager->Init(codecSettings));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ MOS_STATUS JpegPipelineM12::Initialize(void *settings)
m_decodecp = Create_DecodeCpInterface(codecSettings, m_hwInterface->GetCpInterface(), m_hwInterface->GetOsInterface());
if (m_decodecp)
{
m_decodecp->RegisterParams(codecSettings);
DECODE_CHK_STATUS(m_decodecp->RegisterParams(codecSettings));
}
DECODE_CHK_STATUS(CreateFeatureManager());
DECODE_CHK_STATUS(m_featureManager->Init(codecSettings));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ MOS_STATUS Mpeg2PipelineM12::Initialize(void *settings)
m_decodecp = Create_DecodeCpInterface(codecSettings, m_hwInterface->GetCpInterface(), m_hwInterface->GetOsInterface());
if (m_decodecp)
{
m_decodecp->RegisterParams(codecSettings);
DECODE_CHK_STATUS(m_decodecp->RegisterParams(codecSettings));
}
DECODE_CHK_STATUS(CreateFeatureManager());
DECODE_CHK_STATUS(m_featureManager->Init(codecSettings));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ MOS_STATUS Vp9PipelineG12::Initialize(void *settings)
m_decodecp = Create_DecodeCpInterface(codecSettings, m_hwInterface->GetCpInterface(), m_hwInterface->GetOsInterface());
if (m_decodecp)
{
m_decodecp->RegisterParams(codecSettings);
DECODE_CHK_STATUS(m_decodecp->RegisterParams(codecSettings));
}
DECODE_CHK_STATUS(CreateFeatureManager());
DECODE_CHK_STATUS(m_featureManager->Init(codecSettings));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ MOS_STATUS Av1PipelineG12_Base::Initialize(void *settings)
m_decodecp = Create_DecodeCpInterface(codecSettings, m_hwInterface->GetCpInterface(), m_hwInterface->GetOsInterface());
if (m_decodecp)
{
m_decodecp->RegisterParams(codecSettings);
DECODE_CHK_STATUS(m_decodecp->RegisterParams(codecSettings));
}
DECODE_CHK_STATUS(CreateFeatureManager());
DECODE_CHK_STATUS(m_featureManager->Init(codecSettings));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ MOS_STATUS DecodePipeline::Initialize(void *settings)
m_decodecp = Create_DecodeCpInterface(codecSettings, m_hwInterface->GetCpInterface(), m_hwInterface->GetOsInterface());
if (m_decodecp)
{
m_decodecp->RegisterParams(codecSettings);
DECODE_CHK_STATUS(m_decodecp->RegisterParams(codecSettings));
}
DECODE_CHK_STATUS(CreateFeatureManager());
DECODE_CHK_STATUS(m_featureManager->Init(codecSettings));
Expand Down Expand Up @@ -286,7 +286,7 @@ MOS_STATUS DecodePipeline::Prepare(void *params)
DECODE_CHK_STATUS(m_featureManager->Update(decodeParams));
if (m_decodecp)
{
m_decodecp->UpdateParams(true);
DECODE_CHK_STATUS(m_decodecp->UpdateParams(true));
}
DECODE_CHK_STATUS(m_subPacketManager->Prepare());

Expand Down
2 changes: 1 addition & 1 deletion media_softlet/agnostic/common/hw/mhw_mi_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class Impl : public Itf, public mhw::Impl
{
m_cpInterface = cpInterface;
MHW_CHK_NULL_RETURN(m_cpInterface);
m_cpInterface->RegisterMiInterfaceNext(m_miItf);
MHW_MI_CHK_STATUS(m_cpInterface->RegisterMiInterfaceNext(m_miItf));
return MOS_STATUS_SUCCESS;
}

Expand Down

0 comments on commit 72fe318

Please sign in to comment.