]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu/powerplay/smu7: fix unintialized data usage
authorArnd Bergmann <arnd@arndb.de>
Tue, 8 Nov 2016 13:52:18 +0000 (14:52 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Nov 2016 15:34:29 +0000 (10:34 -0500)
commit8a55416f8cbd819b7125a2dfe9819aec5341be00
tree29a03a386e346b0f9009582e2b7fb7d3990fedf2
parenta91eb3569d5234f3fc194044ef75e1ca63e3d6fc
drm/amdgpu/powerplay/smu7: fix unintialized data usage

A recent bugfix replaced an out-of-bounds access with direct
use of unintialized data:

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c: In function 'smu7_patch_limits_vddc':
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2033:6: error: 'vddc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2146:11: note: 'vddc' was declared here
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2033:6: error: 'vddci' may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2146:17: note: 'vddci' was declared here
  uint32_t vddc, vddci;

This initializes the data as before using the correct type.

Fixes: 5554f2e3426a ("drm/amdgpu/powerplay/smu7: fix static checker warning")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c