• Arnd Bergmann's avatar
    drm/amdgpu/powerplay/smu7: fix unintialized data usage · a29d1260
    Arnd Bergmann authored
    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: 77f7f71f ("drm/amdgpu/powerplay/smu7: fix static checker warning")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    a29d1260
smu7_hwmgr.c 142 KB