diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 9fcb3bc59558c8ac90c6ab7fa07e0af1d7e7aeb6..b382e9453a66546d86e519da002ba0d7c4e6315e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -71,7 +71,7 @@ static void amdgpu_bo_destroy(struct ttm_buffer_object *tbo) } amdgpu_bo_unref(&bo->parent); - if (bo->tbo.type == ttm_bo_type_device) { + if (bo->tbo.type != ttm_bo_type_kernel) { ubo = to_amdgpu_bo_user(bo); kfree(ubo->metadata); }