Skip to contentSkip to conversation

drm/amd/pp: Fix NULL point check error in smu_set_watermarks_for_clocks_ranges

PATCH New Rex Zhu 1 participant 1 message Apr 19, 2018

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/1 drm/amd/pp: Fix NULL point check error in smu_set_watermarks_for_clocks_ranges

---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c +1 -1
index 7c23741..93a3d02 100644
@@ -657,7 +657,7 @@ int smu_set_watermarks_for_clocks_ranges(void *wt_table,
 	uint32_t i;
 	struct watermarks *table = wt_table;
 
-	if (!table || wm_with_clock_ranges)
+	if (!table || !wm_with_clock_ranges)
 		return -EINVAL;
 
 	if (wm_with_clock_ranges->num_wm_sets_dmif > 4 || wm_with_clock_ranges->num_wm_sets_mcif > 4)
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx