[ 127/171] drm/i915: prevent possible pin leak on error path

From: Greg Kroah-Hartman
Date: Tue Jan 15 2013 - 17:52:39 EST


3.4-stable review patch. If anyone has any objections, please let me know.

------------------

From: Eugeni Dodonov <eugeni.dodonov@xxxxxxxxx>

commit ab3951eb74e7c33a2f5b7b64d72e82f1eea61571 upstream.

We should not hit this under any sane conditions, but still, this does not
looks right.

Reported-by: Herton Ronaldo Krzesinski <herton.krzesinski@xxxxxxxxxxxxx>
CC: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
CC: Daniel Vetter <daniel.vetter@xxxxxxxx>
Reviewed-by: Chris Wlison <chris@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@xxxxxxxxx>
Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
Signed-off-by: Julien Cristau <jcristau@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
drivers/gpu/drm/i915/intel_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7505,7 +7505,7 @@ static int intel_gen7_queue_flip(struct
default:
WARN_ONCE(1, "unknown plane in flip command\n");
ret = -ENODEV;
- goto err;
+ goto err_unpin;
}

ret = intel_ring_begin(ring, 4);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/