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

Commit 47d0c2b4 authored by Jayant Shekhar's avatar Jayant Shekhar Committed by Harsh Sahu
Browse files

msm: mdss: Fix null pointer reference during debug init



Some targets doesn't seem to have vbif_nrt_phys in dtsi
file but we still register the debug node for vbif_nrt_reg
and off without checking whether it exists or not. Ensure
this is checked to avoid null pointer reference.

Change-Id: Icce8823f80e586bc4827d8db18dceb2fb866c2f9
Signed-off-by: default avatarJayant Shekhar <jshekhar@codeaurora.org>
parent 419c2b4a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1816,7 +1816,9 @@ static int mdss_mdp_debug_init(struct platform_device *pdev,
	mdss_debug_register_dump_range(pdev, dbg_blk, "qcom,regs-dump-mdp",
		"qcom,regs-dump-names-mdp", "qcom,regs-dump-xin-id-mdp");

	if (mdata->vbif_io.base)
		mdss_debug_register_io("vbif", &mdata->vbif_io, NULL);
	if (mdata->vbif_nrt_io.base)
		mdss_debug_register_io("vbif_nrt", &mdata->vbif_nrt_io, NULL);

	return 0;