Skip to contentSkip to conversation

drm/amd/powerplay: remove redundant check in smu_set_soft_freq_range

PATCH New Qiujun Huang 1 participant 1 message Mar 17, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/powerplay: remove redundant check in smu_set_soft_freq_range

min(max) is type of uint32_t, min < 0(max < 0) is never true. move it.

Addressed-Coverity: ("Unsigned compared against 0")

---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +0 -3
index 96e81c7bc266..fdaea0cc2828 100644
@@ -222,9 +222,6 @@ int smu_set_soft_freq_range(struct smu_context *smu, enum smu_clk_type clk_type,
 {
 	int ret = 0;
 
-	if (min < 0 && max < 0)
-		return -EINVAL;
-
 	if (!smu_clk_dpm_is_enabled(smu, clk_type))
 		return 0;
 
Signature · 1 line
2.17.1