Bug: ttm_pool_mgr_init() does not check return value in ttm_global_init(). Fix: Check the return value from ttm_pool_mgr_init() and propagate the error.
Assisted-by: OpenCode:1.17.18-Big Pickle/DeepSeek V4 Flash Assisted-by: claude.ai:Sonnet 5 Cc: <[email protected]> # 7.1.0 Fixes: 444e2a19d7fd ("ttm/pool: port to list_lru. (v2)") Signed-off-by: Óscar Megía López <[email protected]> --- drivers/gpu/drm/ttm/ttm_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c index d3bfb9a696a7..896b766712d0 100644 --- a/drivers/gpu/drm/ttm/ttm_device.c +++ b/drivers/gpu/drm/ttm/ttm_device.c @@ -96,7 +96,9 @@ static int ttm_global_init(void) >> PAGE_SHIFT; num_dma32 = min(num_dma32, 2UL << (30 - PAGE_SHIFT)); - ttm_pool_mgr_init(num_pages); + ret = ttm_pool_mgr_init(num_pages); + if (ret) + goto out; ttm_tt_mgr_init(num_pages, num_dma32); glob->dummy_read_page = alloc_page(__GFP_ZERO | GFP_DMA32 | -- 2.55.0
