]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Jul 2023 10:18:00 +0000 (12:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Jul 2023 10:18:00 +0000 (12:18 +0200)
added patches:
drm-edid-fix-uninitialized-variable-in-drm_cvt_modes.patch

queue-4.19/drm-edid-fix-uninitialized-variable-in-drm_cvt_modes.patch [new file with mode: 0644]
queue-4.19/series

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 (file)
index 0000000..e383b4f
--- /dev/null
@@ -0,0 +1,39 @@
+From 991fcb77f490390bcad89fa67d95763c58cdc04c Mon Sep 17 00:00:00 2001
+From: Lyude Paul <lyude@redhat.com>
+Date: Thu, 5 Nov 2020 18:57:02 -0500
+Subject: drm/edid: Fix uninitialized variable in drm_cvt_modes()
+
+From: Lyude Paul <lyude@redhat.com>
+
+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 <lyude@redhat.com>
+Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
+Link: https://patchwork.freedesktop.org/patch/msgid/20201105235703.1328115-1-lyude@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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++) {
index 1b5430f0bd40e658482ac6da81800549ccbfcceb..f19f73c33c9b41eebaf2ebfb104ed1f1ca1c7e8e 100644 (file)
@@ -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