mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 23:45:31 +08:00
drm/amd/display: add null checks before logging
Adding NULL checks to various parameters in log_tf, to avoid nullptr errors Signed-off-by: Wyatt Wood <wyatt.wood@amd.com> Reviewed-by: Anthony Koo <Anthony.Koo@amd.com> Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> Acked-by: Nikola Cornij <Nikola.Cornij@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
43d4baab52
commit
ddef02de0d
@ -1503,9 +1503,12 @@ dcn10_set_output_transfer_func(struct pipe_ctx *pipe_ctx,
|
||||
} else
|
||||
dpp->funcs->dpp_program_regamma_pwl(dpp, NULL, OPP_REGAMMA_BYPASS);
|
||||
|
||||
log_tf(stream->ctx,
|
||||
stream->out_transfer_func,
|
||||
dpp->regamma_params.hw_points_num);
|
||||
if (stream != NULL && stream->ctx != NULL &&
|
||||
stream->out_transfer_func != NULL) {
|
||||
log_tf(stream->ctx,
|
||||
stream->out_transfer_func,
|
||||
dpp->regamma_params.hw_points_num);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user