msm: mdss: Correct error handling in MDSS driver
Fix variable initialization and NULL pointer referencing under error condition handling in the MDSS driver. CRs-Fixed: 1067141 Change-Id: Idd971601d5358104831784d645d84b1f9d2b631c Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
This commit is contained in:
parent
4b91c1a0f7
commit
f1f813d214
2 changed files with 10 additions and 7 deletions
|
@ -3382,14 +3382,17 @@ static int mdss_mdp_parse_dt_pipe(struct platform_device *pdev)
|
|||
mdata->has_panic_ctrl = of_property_read_bool(pdev->dev.of_node,
|
||||
"qcom,mdss-has-panic-ctrl");
|
||||
if (mdata->has_panic_ctrl) {
|
||||
mdss_mdp_parse_dt_pipe_panic_ctrl(pdev,
|
||||
"qcom,mdss-pipe-vig-panic-ctrl-offsets",
|
||||
if (mdata->vig_pipes)
|
||||
mdss_mdp_parse_dt_pipe_panic_ctrl(pdev,
|
||||
"qcom,mdss-pipe-vig-panic-ctrl-offsets",
|
||||
mdata->vig_pipes, mdata->nvig_pipes);
|
||||
mdss_mdp_parse_dt_pipe_panic_ctrl(pdev,
|
||||
"qcom,mdss-pipe-rgb-panic-ctrl-offsets",
|
||||
if (mdata->rgb_pipes)
|
||||
mdss_mdp_parse_dt_pipe_panic_ctrl(pdev,
|
||||
"qcom,mdss-pipe-rgb-panic-ctrl-offsets",
|
||||
mdata->rgb_pipes, mdata->nrgb_pipes);
|
||||
mdss_mdp_parse_dt_pipe_panic_ctrl(pdev,
|
||||
"qcom,mdss-pipe-dma-panic-ctrl-offsets",
|
||||
if (mdata->dma_pipes)
|
||||
mdss_mdp_parse_dt_pipe_panic_ctrl(pdev,
|
||||
"qcom,mdss-pipe-dma-panic-ctrl-offsets",
|
||||
mdata->dma_pipes, mdata->ndma_pipes);
|
||||
}
|
||||
|
||||
|
|
|
@ -430,7 +430,7 @@ int mdss_mdp_cwb_validate(struct msm_fb_data_type *mfd,
|
|||
return rc;
|
||||
|
||||
fmt = mdss_mdp_get_format_params(layer->buffer.format);
|
||||
if (!(fmt->flag & VALID_MDP_WB_INTF_FORMAT)) {
|
||||
if (!fmt || (fmt && !(fmt->flag & VALID_MDP_WB_INTF_FORMAT))) {
|
||||
pr_err("wb does not support dst fmt:%d\n",
|
||||
layer->buffer.format);
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Add table
Reference in a new issue