Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1f813d2 authored by Benjamin Chan's avatar Benjamin Chan Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarBenjamin Chan <bkchan@codeaurora.org>
parent 4b91c1a0
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -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,
		"qcom,mdss-has-panic-ctrl");
	if (mdata->has_panic_ctrl) {
		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);
		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);
		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);
+1 −1
Original line number Diff line number Diff line
@@ -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;