]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drivers/gpu/drm/i915/i915_gem.c: Add missing error handling code
authorJulia Lawall <julia@diku.dk>
Sat, 2 Oct 2010 13:59:17 +0000 (15:59 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 29 Oct 2010 04:51:24 +0000 (21:51 -0700)
commit6c05813f0d8e05b2b6643843100b02687dd03929
tree1cbeccb21652e084cb63f6496ebf614e0ce039ac
parent677c3a487715716e4c8e61a882e0680578d90103
drivers/gpu/drm/i915/i915_gem.c: Add missing error handling code

commit 929f49bf225b1b6cd04d0a7b9c0f7377d9131220 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/i915/i915_gem.c