From 843e42d592fb40b14cc45f14e465c811871f3175 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 9 Jul 2023 12:18:00 +0200 Subject: [PATCH] 4.19-stable patches added patches: drm-edid-fix-uninitialized-variable-in-drm_cvt_modes.patch --- ...nitialized-variable-in-drm_cvt_modes.patch | 39 +++++++++++++++++++ queue-4.19/series | 1 + 2 files changed, 40 insertions(+) create mode 100644 queue-4.19/drm-edid-fix-uninitialized-variable-in-drm_cvt_modes.patch diff --git a/queue-4.19/drm-edid-fix-uninitialized-variable-in-drm_cvt_modes.patch b/queue-4.19/drm-edid-fix-uninitialized-variable-in-drm_cvt_modes.patch new file mode 100644 index 00000000000..e383b4f6ec5 --- /dev/null +++ b/queue-4.19/drm-edid-fix-uninitialized-variable-in-drm_cvt_modes.patch @@ -0,0 +1,39 @@ +From 991fcb77f490390bcad89fa67d95763c58cdc04c Mon Sep 17 00:00:00 2001 +From: Lyude Paul +Date: Thu, 5 Nov 2020 18:57:02 -0500 +Subject: drm/edid: Fix uninitialized variable in drm_cvt_modes() + +From: Lyude Paul + +commit 991fcb77f490390bcad89fa67d95763c58cdc04c upstream. + +Noticed this when trying to compile with -Wall on a kernel fork. We +potentially don't set width here, which causes the compiler to complain +about width potentially being uninitialized in drm_cvt_modes(). So, let's +fix that. + +Changes since v1: +* Don't emit an error as this code isn't reachable, just mark it as such +Changes since v2: +* Remove now unused variable + +Fixes: 3f649ab728cd ("treewide: Remove uninitialized_var() usage") +Signed-off-by: Lyude Paul +Reviewed-by: Ilia Mirkin +Link: https://patchwork.freedesktop.org/patch/msgid/20201105235703.1328115-1-lyude@redhat.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/drm_edid.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/gpu/drm/drm_edid.c ++++ b/drivers/gpu/drm/drm_edid.c +@@ -2798,6 +2798,8 @@ static int drm_cvt_modes(struct drm_conn + case 0x0c: + width = height * 15 / 9; + break; ++ default: ++ unreachable(); + } + + for (j = 1; j < 5; j++) { diff --git a/queue-4.19/series b/queue-4.19/series index 1b5430f0bd4..f19f73c33c9 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -3,6 +3,7 @@ x86-microcode-amd-load-late-on-both-threads-too.patch x86-smp-use-dedicated-cache-line-for-mwait_play_dead.patch video-imsttfb-check-for-ioremap-failures.patch fbdev-imsttfb-fix-use-after-free-bug-in-imsttfb_probe.patch +drm-edid-fix-uninitialized-variable-in-drm_cvt_modes.patch scripts-tags.sh-resolve-gtags-empty-index-generation.patch drm-amdgpu-validate-vm-ioctl-flags.patch treewide-remove-uninitialized_var-usage.patch -- 2.47.3