Merge drm/drm-fixes into drm-misc-fixes
[sfrench/cifs-2.6.git] / drivers / gpu / drm / ttm / ttm_bo.c
index 0e210df65c305393477085e8cfcf6032587b2c8d..97184c33352662662bbd27de462eacb111045435 100644 (file)
@@ -912,7 +912,7 @@ int ttm_bo_validate(struct ttm_buffer_object *bo,
        /*
         * We might need to add a TTM.
         */
-       if (bo->resource->mem_type == TTM_PL_SYSTEM) {
+       if (!bo->resource || bo->resource->mem_type == TTM_PL_SYSTEM) {
                ret = ttm_tt_create(bo, true);
                if (ret)
                        return ret;