drm/amd/display: Use boolean context for pointer null checks

Replace "out == 0" with "!out" for pointer comparison to improve code
readability and conform to coding style.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Qianfeng Rong 2025-08-12 16:31:49 +08:00 committed by Alex Deucher
parent 90b810dd85
commit 5c8d5e2619
4 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ bool dml2_core_create(enum dml2_project_id project_id, struct dml2_core_instance
{
bool result = false;
if (out == 0)
if (!out)
return false;
memset(out, 0, sizeof(struct dml2_core_instance));

View File

@ -20,7 +20,7 @@ bool dml2_dpmm_create(enum dml2_project_id project_id, struct dml2_dpmm_instance
{
bool result = false;
if (out == 0)
if (!out)
return false;
memset(out, 0, sizeof(struct dml2_dpmm_instance));

View File

@ -15,7 +15,7 @@ bool dml2_mcg_create(enum dml2_project_id project_id, struct dml2_mcg_instance *
{
bool result = false;
if (out == 0)
if (!out)
return false;
memset(out, 0, sizeof(struct dml2_mcg_instance));

View File

@ -26,7 +26,7 @@ bool dml2_pmo_create(enum dml2_project_id project_id, struct dml2_pmo_instance *
{
bool result = false;
if (out == 0)
if (!out)
return false;
memset(out, 0, sizeof(struct dml2_pmo_instance));