OSDN Git Service

drm/amd/display: Fix couple more inconsistent NULL checks in dc_resource
authorHarry Wentland <harry.wentland@amd.com>
Sat, 11 Nov 2017 01:35:27 +0000 (20:35 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 28 Nov 2017 22:56:40 +0000 (17:56 -0500)
commite41ab0309a1b75d31c360d1d2b0de58e8d7958ad
tree92bcea199c230ac03d2bff7a7cb9b9b40f61e135
parentedf38b58ecd847df75723fb90d4a1c3669b1e670
drm/amd/display: Fix couple more inconsistent NULL checks in dc_resource

Found by smatch:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:1001
acquire_free_pipe_for_stream() error: we previously assumed 'head_pipe'
could be null (see line 998)
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:1808
dc_validate_global_state() error: we previously assumed 'new_ctx' could
be null (see line 1778)

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c