mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 00:47:56 -04:00
drm/amd/display: Fix null pointer
Add guard for NULL pointer access Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Charlene Liu <charlene.liu@amd.com> Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Johnson Chen <johnson.chen@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
823423b8ec
commit
2cbed167d2
@@ -158,6 +158,8 @@ bool is_dp2p0_output_encoder(const struct pipe_ctx *pipe_ctx)
|
||||
/* If this assert is hit then we have a link encoder dynamic management issue */
|
||||
ASSERT(pipe_ctx->stream_res.hpo_dp_stream_enc ? pipe_ctx->link_res.hpo_dp_link_enc != NULL : true);
|
||||
|
||||
if (pipe_ctx->stream == NULL)
|
||||
return false;
|
||||
/* Count MST hubs once by treating only 1st remote sink in topology as an encoder */
|
||||
if (pipe_ctx->stream->link && pipe_ctx->stream->link->remote_sinks[0]) {
|
||||
return (pipe_ctx->stream_res.hpo_dp_stream_enc &&
|
||||
|
||||
Reference in New Issue
Block a user