aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRex Zhu <[email protected]>2016-01-06 16:22:07 +0800
committerAlex Deucher <[email protected]>2016-01-08 15:39:22 -0500
commit53d3de140b668d37e1ebfe01c94ec36d369edcbf (patch)
tree041a8a9c4babdb2ce0fd1b37e6e108a10682c2ad
parent15c3277ff60286860b3dc98651fc241875e678fa (diff)
drm/amd/powerplay: fix bug that NULL checks are reversed.
&& was used instead of ||. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Ken Wang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
index 5bac36baa13c..c0e6aae8fa1d 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
@@ -579,7 +579,7 @@ static int cz_tf_init_sclk_limit(struct pp_hwmgr *hwmgr, void *input,
hwmgr->dyn_state.vddc_dependency_on_sclk;
unsigned long clock = 0, level;
- if (NULL == table && table->count <= 0)
+ if (NULL == table || table->count <= 0)
return -EINVAL;
cz_hwmgr->sclk_dpm.soft_min_clk = table->entries[0].clk;
@@ -606,7 +606,7 @@ static int cz_tf_init_uvd_limit(struct pp_hwmgr *hwmgr, void *input,
hwmgr->dyn_state.uvd_clock_voltage_dependency_table;
unsigned long clock = 0, level;
- if (NULL == table && table->count <= 0)
+ if (NULL == table || table->count <= 0)
return -EINVAL;
cz_hwmgr->uvd_dpm.soft_min_clk = 0;
@@ -634,7 +634,7 @@ static int cz_tf_init_vce_limit(struct pp_hwmgr *hwmgr, void *input,
hwmgr->dyn_state.vce_clock_voltage_dependency_table;
unsigned long clock = 0, level;
- if (NULL == table && table->count <= 0)
+ if (NULL == table || table->count <= 0)
return -EINVAL;
cz_hwmgr->vce_dpm.soft_min_clk = 0;
@@ -662,7 +662,7 @@ static int cz_tf_init_acp_limit(struct pp_hwmgr *hwmgr, void *input,
hwmgr->dyn_state.acp_clock_voltage_dependency_table;
unsigned long clock = 0, level;
- if (NULL == table && table->count <= 0)
+ if (NULL == table || table->count <= 0)
return -EINVAL;
cz_hwmgr->acp_dpm.soft_min_clk = 0;
@@ -1183,7 +1183,7 @@ int cz_phm_unforce_dpm_levels(struct pp_hwmgr *hwmgr)
hwmgr->dyn_state.vddc_dependency_on_sclk;
unsigned long clock = 0, level;
- if (NULL == table && table->count <= 0)
+ if (NULL == table || table->count <= 0)
return -EINVAL;
cz_hwmgr->sclk_dpm.soft_min_clk = table->entries[0].clk;