summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2021-06-07 19:10:45 +0200
committerChristian König <christian.koenig@amd.com>2021-06-07 19:54:46 +0200
commitb8be9e19f4658c28f3e4971adbe233f17f8714aa (patch)
treef09409b82fc7fbc0c0ca9a61a7db7b63a16089ba /drivers/gpu/drm
parent24994b91ecc57602d1084d243cd89752dda7865c (diff)
drm/ttm: fix access to uninitialized variable.
The resource is not allocated yet, so no chance that this will work. Use the placement instead. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210607171152.15914-1-christian.koenig@amd.com
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 08f8797eaa7b..db53fecca696 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -749,7 +749,7 @@ static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo,
struct ww_acquire_ctx *ticket;
int ret;
- man = ttm_manager_type(bdev, (*mem)->mem_type);
+ man = ttm_manager_type(bdev, place->mem_type);
ticket = dma_resv_locking_ctx(bo->base.resv);
do {
ret = ttm_resource_alloc(bo, place, mem);