Commit 6e669baa authored by Tom Rix's avatar Tom Rix Committed by Greg Kroah-Hartman
Browse files

drm/amd/pm: return -ENOTSUPP if there is no get_dpm_ultimate_freq function



[ Upstream commit 430e6a02 ]

clang static analysis reports this represenative problem
amdgpu_smu.c:144:18: warning: The left operand of '*' is a garbage value
        return clk_freq * 100;
               ~~~~~~~~ ^

If there is no get_dpm_ultimate_freq function,
smu_get_dpm_freq_range returns success without setting the
output min,max parameters.  So return an -ENOTSUPP error.

Fixes: e5ef784b ("drm/amd/powerplay: revise calling chain on retrieving frequency range")
Signed-off-by: default avatarTom Rix <trix@redhat.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 19a7eba2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment