drm/amd/display: Add null checks
Added NULL checks before two problematic statements Signed-off-by: Wang <anguwang@amd.com> Reviewed-by: Martin Leung <Martin.Leung@amd.com> Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -221,6 +221,9 @@ struct dc_stream_status *dc_stream_get_status_from_state(
|
||||
{
|
||||
uint8_t i;
|
||||
|
||||
if (state == NULL)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < state->stream_count; i++) {
|
||||
if (stream == state->streams[i])
|
||||
return &state->stream_status[i];
|
||||
|
||||
Reference in New Issue
Block a user