mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
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:
parent
90b810dd85
commit
5c8d5e2619
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user