From b115e809fe83d672b677c5c0c8ae2a9aef199da4 Mon Sep 17 00:00:00 2001 From: Sree Sesha Aravind Vadrevu Date: Thu, 7 Nov 2013 18:45:47 -0800 Subject: msm: mdss: Sanitize input to writeback kickoff The input frame buffer structure needs to be sanity checked for the presence of ctl. It avoids initiating kickoff sequence with an unattached ctl which can lead to a kernel panic. CRs-fixed: 566720 Change-Id: I4b5cb7983092853aa2286bddee051a5e250e3744 Signed-off-by: Sree Sesha Aravind Vadrevu --- drivers/video/fbdev/msm/mdss_mdp_wb.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/video/fbdev/msm/mdss_mdp_wb.c b/drivers/video/fbdev/msm/mdss_mdp_wb.c index 5fe587ffb4df..c56d5fb4a251 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_wb.c +++ b/drivers/video/fbdev/msm/mdss_mdp_wb.c @@ -566,6 +566,11 @@ int mdss_mdp_wb_kickoff(struct msm_fb_data_type *mfd) int ret = 0; struct mdss_mdp_writeback_arg wb_args; + if (!ctl) { + pr_err("no ctl attached to fb=%d devicet\n", mfd->index); + return -ENODEV; + } + if (!ctl->power_on) return 0; -- cgit v1.2.3