Commit 5c8d5e26 authored by Qianfeng Rong's avatar Qianfeng Rong Committed by Alex Deucher
Browse files

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: default avatarQianfeng Rong <rongqianfeng@vivo.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 90b810dd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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));
+1 −1
Original line number Diff line number Diff line
@@ -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));
+1 −1
Original line number Diff line number Diff line
@@ -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));
+1 −1
Original line number Diff line number Diff line
@@ -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));