Commit e4067957 authored by Sohaib Nadeem's avatar Sohaib Nadeem Committed by Alex Deucher

drm/amd/display: Added missing null checks

[why&how]
Add the missing null check before dereference for dc_stream_status*

Fixes: 2d5bb791 ("drm/amd/display: Implement update_planes_and_stream_v3 sequence")
Reviewed-by: default avatarJosip Pavic <josip.pavic@amd.com>
Acked-by: default avatarTom Chung <chiahsuan.chung@amd.com>
Signed-off-by: default avatarSohaib Nadeem <sohaib.nadeem@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9d432419
...@@ -4291,6 +4291,9 @@ static int initialize_empty_surface_updates( ...@@ -4291,6 +4291,9 @@ static int initialize_empty_surface_updates(
struct dc_stream_status *status = dc_stream_get_status(stream); struct dc_stream_status *status = dc_stream_get_status(stream);
int i; int i;
if (!status)
return 0;
for (i = 0; i < status->plane_count; i++) for (i = 0; i < status->plane_count; i++)
srf_updates[i].surface = status->plane_states[i]; srf_updates[i].surface = status->plane_states[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment