Commit e3e04399 authored by Christian König's avatar Christian König

drm/ttm: fix missing NULL check in the new page pool

The pool parameter can be NULL if we free through the shrinker.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Tested-by: default avatarMartin Peres <martin.peres@mupuf.org>
Acked-by: default avatarMartin Peres <martin.peres@mupuf.org>
Reported-by: default avatarAndy Lavr <andy.lavr@gmail.com>
Tested-by: default avatarAndy Lavr <andy.lavr@gmail.com>
Link: https://patchwork.freedesktop.org/patch/399365/
parent a7319c8f
......@@ -135,7 +135,7 @@ static void ttm_pool_free_page(struct ttm_pool *pool, enum ttm_caching caching,
set_pages_wb(p, 1 << order);
#endif
if (!pool->use_dma_alloc) {
if (!pool || !pool->use_dma_alloc) {
__free_pages(p, order);
return;
}
......
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