diff options
| author | 2019-07-03 22:52:18 -0700 | |
|---|---|---|
| committer | 2019-07-08 13:56:18 -0500 | |
| commit | 985863d00a8feb597a38df38f8fc2f70e980156f (patch) | |
| tree | cd50474e13c8fe5f0b245f8b66790ed6cca487f0 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
| parent | drm/amd/powerplay: Zero initialize freq in smu_v11_0_get_current_clk_freq (diff) | |
| download | wireguard-linux-985863d00a8feb597a38df38f8fc2f70e980156f.tar.xz wireguard-linux-985863d00a8feb597a38df38f8fc2f70e980156f.zip | |
drm/amd/powerplay: Zero initialize current_rpm in vega20_get_fan_speed_percent
clang warns (trimmed for brevity):
drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:3023:8: warning:
variable 'current_rpm' is used uninitialized whenever '?:' condition is
false [-Wsometimes-uninitialized]
ret = smu_get_current_rpm(smu, ¤t_rpm);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
smu_get_current_rpm expands to a ternary operator conditional on
smu->funcs->get_current_rpm being not NULL. When this is false,
current_rpm will be uninitialized. Zero initialize current_rpm to
avoid using random stack values if that ever happens.
Fixes: ee0db82027ee ("drm/amd/powerplay: move PPTable_t uses into asic level")
Link: https://github.com/ClangBuiltLinux/linux/issues/588
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
0 files changed, 0 insertions, 0 deletions
