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

Commit 1f38dee5 authored by Steve Cohen's avatar Steve Cohen
Browse files

drm/msm: fix possible uninitialized variable access



Fix the logic so that there is no possibility of using uninitialized
variable values.  This fix is required for when the compiler warning
levels are raised.

Change-Id: I0acf7adfcb48956be975a8c793c1a9a765734abc
Signed-off-by: default avatarSteve Cohen <cohens@codeaurora.org>
parent e7be1c72
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -401,7 +401,7 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
	struct msm_drm_private *priv = dev->dev_private;
	struct drm_msm_gem_submit *args = data;
	struct msm_file_private *ctx = file->driver_priv;
	struct msm_gem_submit *submit;
	struct msm_gem_submit *submit = NULL;
	struct msm_gpu *gpu = priv->gpu;
	struct dma_fence *in_fence = NULL;
	struct sync_file *sync_file = NULL;
+7 −3
Original line number Diff line number Diff line
@@ -280,12 +280,16 @@ static int sde_hdcp_1x_load_keys(void *input)
	dp_link = hdcp->init_data.dp_link;
	reg_set = &hdcp->reg_set;

	if (IS_ENABLED(CONFIG_HDCP_QSEECOM)  &&
	    hdcp1_set_keys(&aksv_msb, &aksv_lsb)) {
	if (!IS_ENABLED(CONFIG_HDCP_QSEECOM)) {
		rc = -EINVAL;
		goto end;
	} else {
		if (hdcp1_set_keys(&aksv_msb, &aksv_lsb)) {
			pr_err("setting hdcp SW keys failed\n");
			rc = -EINVAL;
			goto end;
		}
	}

	pr_debug("%s: AKSV=%02x%08x\n", SDE_HDCP_STATE_NAME,
		aksv_msb, aksv_lsb);