From 40b40b22102ed4609150845375d37db2b2b918ca Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 2 Feb 2024 03:34:24 +0000 Subject: [PATCH] drm/amd/display: Fix uninitialized variable usage in core_link_ 'read_dpcd() & write_dpcd()' functions From Srinivasan Shanmugam b565f41b9f20ed65d73660ffa6d8e495bc839789 in linux-6.6.y/6.6.15 a58371d632ebab9ea63f10893a6b6731196b6f8d in mainline linux --- sys/dev/pci/drm/amd/display/dc/link/protocols/link_dpcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dpcd.c b/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dpcd.c index 5c9a30211c1..fc50931c2ae 100644 --- a/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dpcd.c +++ b/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dpcd.c @@ -205,7 +205,7 @@ enum dc_status core_link_read_dpcd( uint32_t extended_size; /* size of the remaining partitioned address space */ uint32_t size_left_to_read; - enum dc_status status; + enum dc_status status = DC_ERROR_UNEXPECTED; /* size of the next partition to be read from */ uint32_t partition_size; uint32_t data_index = 0; @@ -234,7 +234,7 @@ enum dc_status core_link_write_dpcd( { uint32_t partition_size; uint32_t data_index = 0; - enum dc_status status; + enum dc_status status = DC_ERROR_UNEXPECTED; while (size) { partition_size = dpcd_get_next_partition_size(address, size); -- 2.20.1