Skip to content

Commit b8be9e1

Browse files
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 <[email protected]> Reviewed-by: Thomas Hellström <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 24994b9 commit b8be9e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/ttm/ttm_bo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo,
749749
struct ww_acquire_ctx *ticket;
750750
int ret;
751751

752-
man = ttm_manager_type(bdev, (*mem)->mem_type);
752+
man = ttm_manager_type(bdev, place->mem_type);
753753
ticket = dma_resv_locking_ctx(bo->base.resv);
754754
do {
755755
ret = ttm_resource_alloc(bo, place, mem);

0 commit comments

Comments
 (0)