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,12 +3382,15 @@ static int mdss_mdp_parse_dt_pipe(struct platform_device *pdev)
|
||||||
mdata->has_panic_ctrl = of_property_read_bool(pdev->dev.of_node,
|
mdata->has_panic_ctrl = of_property_read_bool(pdev->dev.of_node,
|
||||||
"qcom,mdss-has-panic-ctrl");
|
"qcom,mdss-has-panic-ctrl");
|
||||||
if (mdata->has_panic_ctrl) {
|
if (mdata->has_panic_ctrl) {
|
||||||
|
if (mdata->vig_pipes)
|
||||||
mdss_mdp_parse_dt_pipe_panic_ctrl(pdev,
|
mdss_mdp_parse_dt_pipe_panic_ctrl(pdev,
|
||||||
"qcom,mdss-pipe-vig-panic-ctrl-offsets",
|
"qcom,mdss-pipe-vig-panic-ctrl-offsets",
|
||||||
mdata->vig_pipes, mdata->nvig_pipes);
|
mdata->vig_pipes, mdata->nvig_pipes);
|
||||||
|
if (mdata->rgb_pipes)
|
||||||
mdss_mdp_parse_dt_pipe_panic_ctrl(pdev,
|
mdss_mdp_parse_dt_pipe_panic_ctrl(pdev,
|
||||||
"qcom,mdss-pipe-rgb-panic-ctrl-offsets",
|
"qcom,mdss-pipe-rgb-panic-ctrl-offsets",
|
||||||
mdata->rgb_pipes, mdata->nrgb_pipes);
|
mdata->rgb_pipes, mdata->nrgb_pipes);
|
||||||
|
if (mdata->dma_pipes)
|
||||||
mdss_mdp_parse_dt_pipe_panic_ctrl(pdev,
|
mdss_mdp_parse_dt_pipe_panic_ctrl(pdev,
|
||||||
"qcom,mdss-pipe-dma-panic-ctrl-offsets",
|
"qcom,mdss-pipe-dma-panic-ctrl-offsets",
|
||||||
mdata->dma_pipes, mdata->ndma_pipes);
|
mdata->dma_pipes, mdata->ndma_pipes);
|
||||||
|
|
|
@ -430,7 +430,7 @@ int mdss_mdp_cwb_validate(struct msm_fb_data_type *mfd,
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
fmt = mdss_mdp_get_format_params(layer->buffer.format);
|
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",
|
pr_err("wb does not support dst fmt:%d\n",
|
||||||
layer->buffer.format);
|
layer->buffer.format);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue