diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c index 7c23741619b6b1f5e95e5ad5bbbf627f1618202b..93a3d022ba47a7d6a20cc7a1f8b763bf3eb58b06 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c @@ -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)