Patch "drm/edid: Fix uninitialized variable in drm_cvt_modes()" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/edid: Fix uninitialized variable in drm_cvt_modes()

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-edid-fix-uninitialized-variable-in-drm_cvt_modes.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 991fcb77f490390bcad89fa67d95763c58cdc04c Mon Sep 17 00:00:00 2001
From: Lyude Paul <lyude@xxxxxxxxxx>
Date: Thu, 5 Nov 2020 18:57:02 -0500
Subject: drm/edid: Fix uninitialized variable in drm_cvt_modes()

From: Lyude Paul <lyude@xxxxxxxxxx>

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@xxxxxxxxxx>
Reviewed-by: Ilia Mirkin <imirkin@xxxxxxxxxxxx>
Link: https://patchwork.freedesktop.org/patch/msgid/20201105235703.1328115-1-lyude@xxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 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++) {


Patches currently in stable-queue which might be from lyude@xxxxxxxxxx are

queue-4.14/drm-edid-fix-uninitialized-variable-in-drm_cvt_modes.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux