catch an out of memory condition
authorAlan Hourihane <alanh@tungstengraphics.com>
Thu, 13 Dec 2007 10:40:36 +0000 (10:40 +0000)
committerAlan Hourihane <alanh@tungstengraphics.com>
Thu, 13 Dec 2007 10:40:36 +0000 (10:40 +0000)
linux-core/drm_bo.c

index 2b8ef1b..d308dcf 100644 (file)
@@ -925,7 +925,7 @@ int drm_bo_mem_space(struct drm_buffer_object *bo,
 
                ret = drm_bo_mem_force_space(dev, mem, mem_type, no_wait);
 
-               if (ret == 0) {
+               if (ret == 0 && mem->mm_node) {
                        mem->flags = cur_flags;
                        return 0;
                }