From: Ben Widawsky Date: Sat, 5 Apr 2014 05:41:07 +0000 (-0700) Subject: drm/i915: Unref context on failed eb_create X-Git-Tag: omap-for-v3.16/fixes-against-rc1~44^2~63^2~38 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=935f38d6948eb0bf10ac691d010fec9e9163a9c6;p=pandora-kernel.git drm/i915: Unref context on failed eb_create I opted to do this instead of grabbing the context reference after eb_create since eb_create can potentially call the shrinker, and that makes things very complicated. This simple patch balances the ref count without requiring a great deal of review to make sure the shrinker path is safe. Theoretically (by design) the shrinker can end up destroying a context, which enforces the reasoning for doing the fix this way instead of moving the reference to later in the function. Cc: Chris Wilson Signed-off-by: Ben Widawsky Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter --- Reading git-diff-tree failed