Skip to contentSkip to conversation

Patch "drm/atomic: fix an error code in mode_fixup()" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Mar 12, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

drm/atomic: fix an error code in mode_fixup()

to the 4.4-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-atomic-fix-an-error-code-in-mode_fixup.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From f9ad86e42d0303eeb8e0d41bb208153022ebd9d2 Mon Sep 17 00:00:00 2001

From: Dan Carpenter <[email protected]>
Date: Wed, 8 Feb 2017 02:46:01 +0300
Subject: drm/atomic: fix an error code in mode_fixup()

From: Dan Carpenter <[email protected]>

commit f9ad86e42d0303eeb8e0d41bb208153022ebd9d2 upstream.

Having "ret" be a bool type works for everything except ret = funcs->atomic_check(). The other functions all return zero on error but ->atomic_check() returns negative error codes. We want to propagate the error code but instead we return 1.

I found this bug with static analysis and I don't know if it affects run time.

Fixes 4cd4df8080a3 ("drm/atomic: Add ->atomic_check() to encoder helpers")
---
 drivers/gpu/drm/drm_atomic_helper.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_atomic_helper.c +1 -1
@@ -265,7 +265,7 @@ mode_fixup(struct drm_atomic_state *stat
 	struct drm_connector *connector;
 	struct drm_connector_state *conn_state;
 	int i;
-	bool ret;
+	int ret;
 
 	for_each_crtc_in_state(state, crtc, crtc_state, i) {
 		if (!crtc_state->mode_changed &&

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/drm-atomic-fix-an-error-code-in-mode_fixup.patch