diff options
author | Julia Lawall <julia@diku.dk> | 2010-10-02 09:59:17 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-02 10:21:26 -0400 |
commit | 929f49bf225b1b6cd04d0a7b9c0f7377d9131220 (patch) | |
tree | 5fe20466662036d72936722ae1f7e86f34836934 | |
parent | e39a01501b228e1be2037d5bddccae2a820af902 (diff) |
drivers/gpu/drm/i915/i915_gem.c: Add missing error handling code
Extend the error handling code with operations found in other nearby error
handling code
A simplified version of the sematic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@r exists@
@r@
statement S1,S2,S3;
constant C1,C2,C3;
@@
*if (...)
{... S1 return -C1;}
...
*if (...)
{... when != S1
return -C2;}
...
*if (...)
{... S1 return -C3;}
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index bced9b25c71e..cfe597865f5d 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -3258,6 +3258,8 @@ i915_gem_object_pin_and_relocate(struct drm_gem_object *obj, | |||
3258 | (int) reloc->offset, | 3258 | (int) reloc->offset, |
3259 | reloc->read_domains, | 3259 | reloc->read_domains, |
3260 | reloc->write_domain); | 3260 | reloc->write_domain); |
3261 | drm_gem_object_unreference(target_obj); | ||
3262 | i915_gem_object_unpin(obj); | ||
3261 | return -EINVAL; | 3263 | return -EINVAL; |
3262 | } | 3264 | } |
3263 | if (reloc->write_domain & I915_GEM_DOMAIN_CPU || | 3265 | if (reloc->write_domain & I915_GEM_DOMAIN_CPU || |