drm/bo: avoid oops if the memory manager for this type isn't initialised
authorDave Airlie <airlied@linux.ie>
Wed, 28 Mar 2007 23:25:04 +0000 (09:25 +1000)
committerDave Airlie <airlied@linux.ie>
Wed, 28 Mar 2007 23:25:04 +0000 (09:25 +1000)
linux-core/drm_bo.c

index d3e89af..1bdc6fe 100644 (file)
@@ -832,6 +832,9 @@ int drm_bo_mem_space(drm_buffer_object_t * bo,
                mem_type = prios[i];
                man = &bm->man[mem_type];
 
+               if (!man->has_type)
+                       continue;
+
                if (!drm_bo_mt_compatible(man, mem_type, mem->mask, &cur_flags))
                        continue;