mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-23 11:04:44 +08:00
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: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Tested-by: Martin Peres <martin.peres@mupuf.org> Acked-by: Martin Peres <martin.peres@mupuf.org> Reported-by: Andy Lavr <andy.lavr@gmail.com> Tested-by: Andy Lavr <andy.lavr@gmail.com> Link: https://patchwork.freedesktop.org/patch/399365/
This commit is contained in:
parent
a7319c8f50
commit
e3e043992c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user