summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/amdgpu_dm
diff options
context:
space:
mode:
authorArnd Bergmann2019-06-17 14:51:45 +0200
committerAlex Deucher2019-06-17 18:02:03 +0200
commite1a2f2d23a989c928c5c5b3d4827daf2f01dd9df (patch)
tree4027612589817c2279c6aa69eb96a0cd531a94a3 /drivers/gpu/drm/amd/display/amdgpu_dm
parentdrm/amd/display: Add missing newline at end of file (diff)
downloadkernel-qcow2-linux-e1a2f2d23a989c928c5c5b3d4827daf2f01dd9df.tar.gz
kernel-qcow2-linux-e1a2f2d23a989c928c5c5b3d4827daf2f01dd9df.tar.xz
kernel-qcow2-linux-e1a2f2d23a989c928c5c5b3d4827daf2f01dd9df.zip
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 'drivers/gpu/drm/amd/display/amdgpu_dm')
0 files changed, 0 insertions, 0 deletions