drm/amd/display: Check for NULL when creating gamma struct
authorKrunoslav Kovac <Krunoslav.Kovac@amd.com>
Wed, 2 Jan 2019 19:12:53 +0000 (14:12 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 14 Jan 2019 20:42:30 +0000 (15:42 -0500)
commitccab1217230246dccc3110990b028f195ad2d609
tree6d094db676cf2293f8adbe3030a99c31706d4427
parent5dc3fc5a7835f6b98184d2b8df909c5230c37a2c
drm/amd/display: Check for NULL when creating gamma struct

[Wjy&How] Some stress test is causing unexpected memory allocation
failure. This prevents null dereference but there will likely be problems
later, hard to gracefully handle memalloc fail for critical objects.

Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Acked-by: Reza Amini <Reza.Amini@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_surface.c