[PATCH v2 3.7-rc8] ttm: Fix possible _manager memory allocation oops

2012-12-08 Thread Tim Gardner
Memory for _manager is allocated using kzalloc() but the result is not checked. I was led to scrutinize ttm_page_alloc_init() from a smatch warning: drivers/gpu/drm/ttm/ttm_page_alloc.c:799 ttm_page_alloc_init() error: potential null dereference '_manager'. (kzalloc returns null) Cc: David Air

[PATCH v2 3.7-rc8] ttm: Fix possible _manager memory allocation oops

2012-12-07 Thread Tim Gardner
Memory for _manager is allocated using kzalloc() but the result is not checked. I was led to scrutinize ttm_page_alloc_init() from a smatch warning: drivers/gpu/drm/ttm/ttm_page_alloc.c:799 ttm_page_alloc_init() error: potential null dereference '_manager'. (kzalloc returns null) Cc: David Air