disp: msm: fix kw issues in sde and dp driver

This change addresses out of range and null checks in
sde and dp driver.

Change-Id: I142196d7394f0bf0abab1bfa89abfd784a5521c8
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
This commit is contained in:
Narendra Muppalla
2020-04-21 15:13:42 -07:00
parent a60fc941c5
commit d07ef2efe0
3 changed files with 22 additions and 10 deletions

View File

@@ -321,10 +321,10 @@ static void _sde_encoder_phys_cmd_setup_irq_hw_idx(
struct sde_encoder_phys *phys_enc)
{
struct sde_encoder_irq *irq;
struct sde_kms *sde_kms = phys_enc->sde_kms;
struct sde_kms *sde_kms;
int ret = 0;
if (!phys_enc || !phys_enc->hw_pp || !phys_enc->hw_ctl) {
if (!phys_enc->sde_kms || !phys_enc->hw_pp || !phys_enc->hw_ctl) {
SDE_ERROR("invalid args %d %d\n", !phys_enc,
phys_enc ? !phys_enc->hw_pp : 0);
return;
@@ -335,6 +335,8 @@ static void _sde_encoder_phys_cmd_setup_irq_hw_idx(
return;
}
sde_kms = phys_enc->sde_kms;
mutex_lock(&sde_kms->vblank_ctl_global_lock);
if (atomic_read(&phys_enc->vblank_refcount)) {