From 6f5f80bcbadab5b25286c7e055f89b8e92d8fa13 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 27 Sep 2021 04:02:04 +0000 Subject: [PATCH] gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port() From Tuo Li 2254383788ff93a423e20068333b9f8376d56cb4 in linux 5.10.y/5.10.67 a211260c34cfadc6068fece8c9e99e0fe1e2a2b6 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_i2c.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_i2c.c index 7255cf1394f..de81e6e411d 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_i2c.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_i2c.c @@ -447,7 +447,7 @@ static void amdgpu_i2c_put_byte(struct amdgpu_i2c_chan *i2c_bus, void amdgpu_i2c_router_select_ddc_port(const struct amdgpu_connector *amdgpu_connector) { - u8 val; + u8 val = 0; if (!amdgpu_connector->router.ddc_valid) return; -- 2.20.1