]> Git Repo - J-linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
Merge tag 'mlx5-updates-2023-12-20' of git://git.kernel.org/pub/scm/linux/kernel...
[J-linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_object.h
index f3ee83cdf97eff81316c86c08a3f04e6126dfaee..d28e21baef16ee3076c20a0bd9aa5fd6c0ba774b 100644 (file)
@@ -252,7 +252,7 @@ static inline bool amdgpu_bo_in_cpu_visible_vram(struct amdgpu_bo *bo)
        struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
        struct amdgpu_res_cursor cursor;
 
-       if (bo->tbo.resource->mem_type != TTM_PL_VRAM)
+       if (!bo->tbo.resource || bo->tbo.resource->mem_type != TTM_PL_VRAM)
                return false;
 
        amdgpu_res_first(bo->tbo.resource, 0, amdgpu_bo_size(bo), &cursor);
This page took 0.030174 seconds and 4 git commands to generate.