Unverified Commit 9dccc6d1 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!7397 drm/amd/display: Fix potential NULL pointer dereferences in...

!7397  drm/amd/display: Fix potential NULL pointer dereferences in 'dcn10_set_output_transfer_func()'

Merge Pull Request from: @ci-robot 
 
PR sync from: Baogen Shang <baogen.shang@outlook.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/OXQUFQXFT33M6VCMXJC3NYN3DHMRPSSI/ 
 
https://gitee.com/openeuler/kernel/issues/I9J6AL 
 
Link:https://gitee.com/openeuler/kernel/pulls/7397

 

Reviewed-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 0e328501 e69f0b98
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1669,6 +1669,9 @@ bool dcn10_set_output_transfer_func(struct dc *dc, struct pipe_ctx *pipe_ctx,
{
	struct dpp *dpp = pipe_ctx->plane_res.dpp;

	if (!stream)
		return false;

	if (dpp == NULL)
		return false;

@@ -1691,8 +1694,8 @@ bool dcn10_set_output_transfer_func(struct dc *dc, struct pipe_ctx *pipe_ctx,
	} else
		dpp->funcs->dpp_program_regamma_pwl(dpp, NULL, OPP_REGAMMA_BYPASS);

	if (stream != NULL && stream->ctx != NULL &&
			stream->out_transfer_func != NULL) {
	if (stream->ctx &&
	    stream->out_transfer_func) {
		log_tf(stream->ctx,
				stream->out_transfer_func,
				dpp->regamma_params.hw_points_num);