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

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

diff --git a/queue-4.14/drm-edid-fix-uninitialized-variable-in-drm_cvt_modes.patch b/queue-4.14/drm-edid-fix-uninitialized-variable-in-drm_cvt_modes.patch
new file mode 100644 (file)
index 0000000..00babc0
--- /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
+@@ -2691,6 +2691,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 b1147658efc45a3b6ff96e21d6530080fc7bf366..4691b0e76e9b7dba5c1e6312b53465f70d236f4d 100644 (file)
@@ -2,6 +2,7 @@ gfs2-don-t-deref-jdesc-in-evict.patch
 x86-microcode-amd-load-late-on-both-threads-too.patch
 x86-smp-use-dedicated-cache-line-for-mwait_play_dead.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