mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 03:53:37 +02:00
drm/amd/display: Added missing null checks
[why&how]
Add the missing null check before dereference for dc_stream_status*
Fixes: 2d5bb791e2 ("drm/amd/display: Implement update_planes_and_stream_v3 sequence")
Reviewed-by: Josip Pavic <josip.pavic@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Sohaib Nadeem <sohaib.nadeem@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
9d43241953
commit
e406795736
|
|
@ -4291,6 +4291,9 @@ static int initialize_empty_surface_updates(
|
|||
struct dc_stream_status *status = dc_stream_get_status(stream);
|
||||
int i;
|
||||
|
||||
if (!status)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < status->plane_count; i++)
|
||||
srf_updates[i].surface = status->plane_states[i];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user