[PATCH v3] drm/ttm: check the return value of kzalloc

2018-01-03 Thread Xiongwei Song
In the function ttm_page_alloc_init, kzalloc call is made for variable _manager, we need to check its return value, it may return NULL. Signed-off-by: Xiongwei Song --- v2->v3: delete goto expression v1->v2: delete kfree _manager --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 ++ 1 file c

[PATCH v2] drm/ttm: check the return value of kzalloc

2018-01-03 Thread Xiongwei Song
In the function ttm_page_alloc_init, kzalloc call is made for variable _manager, we need to check its return value, it may return NULL. Signed-off-by: Xiongwei Song --- v1->v2: delete kfree _manager --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 ++ 1 file changed, 6 insertions(+) diff --

[PATCH] drm/ttm: optimize errors checking and free _manager when finishing

2018-01-03 Thread Xiongwei Song
In the function ttm_page_alloc_init, kzalloc call is made for variable _manager, we need to check its return value, it may return NULL. In the function ttm_page_alloc_fini, we need to call kfree for variable _manager, instead of make _manager NULL directly. Signed-off-by: Xiongwei Song

[PATCH] drm/tilcdc: make tilcdc_mode_hvtotal() static

2017-12-04 Thread Xiongwei Song
splay_mode *mode) Signed-off-by: Xiongwei Song --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index 6ef4d1a..c4804d9 100644 --- a/drivers/gpu/drm/tilcdc/til