Ville Syrjälä 7eaae3c201 Sprinkle igt_assert(ptr) after gem_mmap__{cpu,gtt,wc}
Do the following
 ptr = gem_mmap__{cpu,gtt,wc}()
+igt_assert(ptr);

whenever the code doesn't handle the NULL ptr in any kind of
specific way.

Makes it easier to move the assert into gem_mmap__{cpu,gtt,wc}() itself.

Mostly done with coccinelle, with some manual cleanups:
@@
identifier I;
@@
<... when != igt_assert(I)
     when != igt_require(I)
     when != igt_require_f(I, ...)
     when != I != NULL
     when != I == NULL
(
  I = gem_mmap__gtt(...);
+ igt_assert(I);
|
  I = gem_mmap__cpu(...);
+ igt_assert(I);
|
  I = gem_mmap__wc(...);
+ igt_assert(I);
)
...>

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Stochastically-reviwewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-10-09 18:33:30 +03:00
..
2015-10-07 17:57:27 +01:00
2014-12-10 17:11:35 +00:00
2014-12-10 17:11:35 +00:00
2012-04-10 16:23:18 +02:00
2015-10-07 17:57:27 +01:00
2015-10-09 16:47:05 +03:00
2015-10-09 16:47:05 +03:00
2015-09-24 14:24:18 +01:00
2015-10-09 16:47:05 +03:00
2015-10-09 16:47:05 +03:00
2015-10-09 16:47:05 +03:00
2015-10-07 17:57:27 +01:00
2015-08-21 09:37:10 +01:00
2015-10-09 16:47:05 +03:00
2012-01-15 16:05:43 +01:00