Skip to content

Commit 8f8e19b

Browse files
drm/ttm: fix missing res assignment in ttm_range_man_alloc
That somehow got missing. Signed-off-by: Christian König <[email protected]> Reported-by: Thomas Hellström <[email protected]> Reviewed-by: Thomas Hellström <[email protected]> Fixes: cb1c814 ("drm/ttm: flip the switch for driver allocated resources v2") Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent d3fae3b commit 8f8e19b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

drivers/gpu/drm/ttm/ttm_range_manager.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,14 @@ static int ttm_range_man_alloc(struct ttm_resource_manager *man,
8888
place->fpfn, lpfn, mode);
8989
spin_unlock(&rman->lock);
9090

91-
if (unlikely(ret))
91+
if (unlikely(ret)) {
9292
kfree(node);
93-
else
94-
node->base.start = node->mm_nodes[0].start;
93+
return ret;
94+
}
9595

96-
return ret;
96+
node->base.start = node->mm_nodes[0].start;
97+
*res = &node->base;
98+
return 0;
9799
}
98100

99101
static void ttm_range_man_free(struct ttm_resource_manager *man,

0 commit comments

Comments
 (0)