Skip to contentSkip to conversation

drm/i915: fix incorrect return of an error status

PATCH New Colin King 2 participants 2 messages May 18, 2020

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 drm/i915: fix incorrect return of an error status

From: Colin Ian King <[email protected]>

Currently when a call to intel_atomic_get_dbuf_state fails the error value being returns is a potentially uninitialized value in variable ret. Fix this by returning the error value of new_dbuf_state.

Addresses-Coverity: ("Uninitialized scalar value")

Fixes 3cf43cdc63fb ("drm/i915: Introduce proper dbuf state")
---
 drivers/gpu/drm/i915/intel_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +1 -1
index a21e36ed1a77..762a5184fc69 100644
@@ -5917,7 +5917,7 @@ skl_ddb_add_affected_pipes(struct intel_atomic_state *state)
 
 		new_dbuf_state = intel_atomic_get_dbuf_state(state);
 		if (IS_ERR(new_dbuf_state))
-			return ret;
+			return PTR_ERR(new_dbuf_state);
 
 		old_dbuf_state = intel_atomic_get_old_dbuf_state(state);
 
Signature · 1 line
2.25.1
#1 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: fix incorrect return of an error status

== Series Details ==

== Series Details ==

Series: drm/i915: fix incorrect return of an error status
URL : https://patchwork.freedesktop.org/series/77368/
State : failure

== Summary ==

Applying: drm/i915: fix incorrect return of an error status Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/intel_pm.c
Falling back to patching base and 3-way merge... Auto-merging drivers/gpu/drm/i915/intel_pm.c
No changes -- Patch already applied.

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx