Forráskód Böngészése

disp: msm: sde: add null pointer checks

Add null check for pingpong block used during
the commit phase.

Change-Id: I3ebbcfe9c42ee6d1201a141f553bbb0a0ae97ad6
Signed-off-by: Jayaprakash <[email protected]>
Jayaprakash 5 éve
szülő
commit
4536e7b2a6
1 módosított fájl, 4 hozzáadás és 3 törlés
  1. 4 3
      msm/sde/sde_encoder_phys_vid.c

+ 4 - 3
msm/sde/sde_encoder_phys_vid.c

@@ -756,9 +756,10 @@ static void sde_encoder_phys_vid_enable(struct sde_encoder_phys *phys_enc)
 	vid_enc = to_sde_encoder_phys_vid(phys_enc);
 	intf = phys_enc->hw_intf;
 	ctl = phys_enc->hw_ctl;
-	if (!phys_enc->hw_intf || !phys_enc->hw_ctl) {
-		SDE_ERROR("invalid hw_intf %d hw_ctl %d\n",
-				!phys_enc->hw_intf, !phys_enc->hw_ctl);
+	if (!phys_enc->hw_intf || !phys_enc->hw_ctl || !phys_enc->hw_pp) {
+		SDE_ERROR("invalid hw_intf %d hw_ctl %d hw_pp %d\n",
+				!phys_enc->hw_intf, !phys_enc->hw_ctl,
+				!phys_enc->hw_pp);
 		return;
 	}
 	if (!ctl->ops.update_bitmask) {