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

Commit ff16ce0e authored by Narendra Muppalla's avatar Narendra Muppalla
Browse files

drm/msm/sde: Fix uninitialized variables and pointers



Return values in some cases can be wrongs as its not
initialized properly. Perform proper NULL check for
pointers as well.

Change-Id: Ieac1a8f50dabd2918edaba1bd93599a62b8c9bf0
Signed-off-by: default avatarJayant Shekhar <jshekhar@codeaurora.org>
Signed-off-by: default avatarNarendra Muppalla <NarendraM@codeaurora.org>
parent 8dd0536e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -925,6 +925,11 @@ static unsigned long vco_10nm_recalc_rate(struct clk_hw *hw,
	if (!vco->priv)
		pr_err("vco priv is null\n");

	if (!pll) {
		pr_err("pll is null\n");
		return 0;
	}

	/*
	 * Calculate the vco rate from HW registers only for handoff cases.
	 * For other cases where a vco_10nm_set_rate() has already been
+5 −0
Original line number Diff line number Diff line
@@ -219,6 +219,11 @@ static void dp_bridge_disable(struct drm_bridge *drm_bridge)

	dp = bridge->display;

	if (!dp) {
		pr_err("dp is null\n");
		return;
	}

	if (dp)
		sde_connector_helper_bridge_disable(bridge->connector);

+1 −1
Original line number Diff line number Diff line
@@ -2343,7 +2343,7 @@ static int sde_kms_cont_splash_config(struct msm_kms *kms)
		 * configuration.
		 */
		if (conn_iter &&
			conn_iter->encoder_ids[0] == encoder->base.id) {
			(conn_iter->encoder_ids[0] == encoder->base.id)) {
			connector = conn_iter;
			break;
		}