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

Commit 361bfa88 authored by Chong Gu's avatar Chong Gu
Browse files

drm/msm/dsi-staging: null pointer check at once after call dsi_panel_get



null pointer check at once after called dsi_panel_get function.

Signed-off-by: default avatarChong Gu <chongu@codeaurora.org>
Change-Id: Ib36d7daf86d9f72e069b4cc0ab2d1e2c100efcb7
parent c543b1e1
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -3587,6 +3587,12 @@ static int dsi_display_res_init(struct dsi_display *display)
				display->parser_node,
				display->display_type,
				display->cmdline_topology);
	if (IS_ERR_OR_NULL(display->panel)) {
		rc = PTR_ERR(display->panel);
		pr_err("failed to get panel, rc=%d\n", rc);
		display->panel = NULL;
		goto error_ctrl_put;
	}

	display_for_each_ctrl(i, display) {
		struct msm_dsi_phy *phy = display->ctrl[i].phy;
@@ -3595,13 +3601,6 @@ static int dsi_display_res_init(struct dsi_display *display)
			display->panel->host_config.force_hs_clk_lane;
	}

	if (IS_ERR_OR_NULL(display->panel)) {
		rc = PTR_ERR(display->panel);
		pr_err("failed to get panel, rc=%d\n", rc);
		display->panel = NULL;
		goto error_ctrl_put;
	}

	rc = dsi_display_parse_lane_map(display);
	if (rc) {
		pr_err("Lane map not found, rc=%d\n", rc);