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

Commit f206b420 authored by Vara Reddy's avatar Vara Reddy Committed by Gerrit - the friendly Code Review server
Browse files

disp: msm: dsi: do NULL check before accessing controller node



Add NULL pointer checks, before accessing the controller node.

Change-Id: If24c4fd4352ef5ab7642c817ddaa61a80b725c99
Signed-off-by: default avatarVara Reddy <varar@codeaurora.org>
parent d90419b7
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -4878,13 +4878,14 @@ static int dsi_display_set_mode_sub(struct dsi_display *display,
			(DSI_MODE_FLAG_DFPS | DSI_MODE_FLAG_VRR)) {
		display_for_each_ctrl(i, display) {
			ctrl = &display->ctrl[i];
			ctrl->ctrl->hw.ops.set_timing_db(&ctrl->ctrl->hw,
					true);
			dsi_phy_dynamic_refresh_clear(ctrl->phy);

			if (!ctrl->ctrl || (ctrl != mctrl))
				continue;

			ctrl->ctrl->hw.ops.set_timing_db(&ctrl->ctrl->hw,
					true);
			dsi_phy_dynamic_refresh_clear(ctrl->phy);

			if ((ctrl->ctrl->version >= DSI_CTRL_VERSION_2_5) &&
					(dyn_clk_caps->maintain_const_fps)) {
				dsi_phy_dynamic_refresh_trigger_sel(ctrl->phy,