aboutsummaryrefslogtreecommitdiff
path: root/ipc/msg.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-06-17 14:51:45 +0200
committerAlex Deucher <alexander.deucher@amd.com>2019-06-17 11:02:03 -0500
commite1a2f2d23a989c928c5c5b3d4827daf2f01dd9df (patch)
tree4027612589817c2279c6aa69eb96a0cd531a94a3 /ipc/msg.c
parentb6bb56ac7d16887f8ef95403b18d346b5cfae8cf (diff)
drm/amdgpu: fix error handling in df_v3_6_pmc_start
When df_v3_6_pmc_get_ctrl_settings() fails for some reason, we store uninitialized data in a register, as gcc points out: drivers/gpu/drm/amd/amdgpu/df_v3_6.c: In function 'df_v3_6_pmc_start': drivers/gpu/drm/amd/amdgpu/amdgpu.h:1012:29: error: 'lo_val' may be used uninitialized in this function [-Werror=maybe-uninitialized] #define WREG32_PCIE(reg, v) adev->pcie_wreg(adev, (reg), (v)) ^~~~ drivers/gpu/drm/amd/amdgpu/df_v3_6.c:334:39: note: 'lo_val' was declared here uint32_t lo_base_addr, hi_base_addr, lo_val, hi_val; ^~~~~~ Make it return a proper error code that we can catch in the caller. Fixes: 992af942a6cf ("drm/amdgpu: add df perfmon regs and funcs for xgmi") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'ipc/msg.c')
0 files changed, 0 insertions, 0 deletions