disp: msm: sde: avoid null pointer dereference

This change avoids null pointer dereference in different APIs.

Change-Id: I01eba9d64fa4ba2fd81f7f39f586867e22d66771
Signed-off-by: Narendra Muppalla <quic_nmuppall@quicinc.com>
这个提交包含在:
Narendra Muppalla
2022-02-11 15:59:01 -08:00
父节点 231eb36b84
当前提交 ae96cad06c
修改 6 个文件,包含 117 行新增48 行删除

查看文件

@@ -180,6 +180,9 @@ static void _sde_encoder_phys_signal_frame_done(struct sde_encoder_phys *phys_en
cmd_enc = to_sde_encoder_phys_cmd(phys_enc);
ctl = phys_enc->hw_ctl;
if (!ctl)
return;
/* notify all synchronous clients first, then asynchronous clients */
if (phys_enc->parent_ops.handle_frame_done &&
atomic_add_unless(&phys_enc->pending_kickoff_cnt, -1, 0)) {
@@ -1860,11 +1863,13 @@ static void sde_encoder_phys_cmd_prepare_commit(
struct sde_encoder_phys *phys_enc)
{
struct sde_encoder_phys_cmd *cmd_enc = to_sde_encoder_phys_cmd(phys_enc);
struct sde_kms *sde_kms = phys_enc->sde_kms;
struct sde_kms *sde_kms;
if (!phys_enc || !sde_encoder_phys_cmd_is_master(phys_enc))
return;
sde_kms = phys_enc->sde_kms;
SDE_EVT32(DRMID(phys_enc->parent), phys_enc->intf_idx - INTF_0,
cmd_enc->autorefresh.cfg.enable);