summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2020-02-27 05:24:51 +0000
committerjsg <jsg@openbsd.org>2020-02-27 05:24:51 +0000
commit7ccb3e5f122329f98f208f0f2a949ed2a9990be1 (patch)
treee6174de508d35f7e870c48c9a39b1d8d35dfb68d
parentdrm/amdgpu: remove 4 set but not used variable in amdgpu_atombios_get_connector_info_from_object_table (diff)
downloadwireguard-openbsd-7ccb3e5f122329f98f208f0f2a949ed2a9990be1.tar.xz
wireguard-openbsd-7ccb3e5f122329f98f208f0f2a949ed2a9990be1.zip
drm/amdgpu: Ensure ret is always initialized when using SOC15_WAIT_ON_RREG
From Nathan Chancellor a882dcd9fd487eca8f019dd9814cacb7fb82b2c4 in linux 4.19.y/4.19.106 a63141e31764f8daf3f29e8e2d450dcf9199d1c8 in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/soc15_common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/soc15_common.h b/sys/dev/pci/drm/amd/amdgpu/soc15_common.h
index 0942f492d2e..9d444f7fdfc 100644
--- a/sys/dev/pci/drm/amd/amdgpu/soc15_common.h
+++ b/sys/dev/pci/drm/amd/amdgpu/soc15_common.h
@@ -51,6 +51,7 @@
do { \
uint32_t tmp_ = RREG32(adev->reg_offset[ip##_HWIP][inst][reg##_BASE_IDX] + reg); \
uint32_t loop = adev->usec_timeout; \
+ ret = 0; \
while ((tmp_ & (mask)) != (expected_value)) { \
udelay(2); \
tmp_ = RREG32(adev->reg_offset[ip##_HWIP][inst][reg##_BASE_IDX] + reg); \