Commit 8f8e19bd authored by Christian König's avatar Christian König

drm/ttm: fix missing res assignment in ttm_range_man_alloc

That somehow got missing.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reported-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
Fixes: cb1c8146 ("drm/ttm: flip the switch for driver allocated resources v2")
Link: https://patchwork.freedesktop.org/patch/msgid/20210607104040.22017-1-christian.koenig@amd.com
parent d3fae3b3
......@@ -88,12 +88,14 @@ static int ttm_range_man_alloc(struct ttm_resource_manager *man,
place->fpfn, lpfn, mode);
spin_unlock(&rman->lock);
if (unlikely(ret))
if (unlikely(ret)) {
kfree(node);
else
node->base.start = node->mm_nodes[0].start;
return ret;
}
node->base.start = node->mm_nodes[0].start;
*res = &node->base;
return 0;
}
static void ttm_range_man_free(struct ttm_resource_manager *man,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment