[PATCH] drm/msm/dsi: do not use unintialized kms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Without this patch boot ends at NULL ptr exception at msm_dsi_manager_setup_encoder
on devices like Nexus 7 with MDP4 version 4.4.

Fixes: 5d0e97dc8c4c ("drm/msm/dsi: Move setup_encoder to modeset_init")

Signed-off-by: David Heidelberg <david@xxxxxxx>
---
 drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 4ebfedc4a9ac..8114612b34b0 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -230,7 +230,7 @@ void msm_dsi_manager_setup_encoder(int id)
 	struct msm_kms *kms = priv->kms;
 	struct drm_encoder *encoder = msm_dsi_get_encoder(msm_dsi);
 
-	if (encoder && kms->funcs->set_encoder_mode)
+	if (encoder && kms && kms->funcs->set_encoder_mode)
 		kms->funcs->set_encoder_mode(kms, encoder,
 					     dsi_mgr_is_cmd_mode(msm_dsi));
 }
-- 
2.30.2




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux