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

Commit d83747f3 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm: msm: fix potential NULL pointer dereference"

parents dd13676f f42176b6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2015, 2018 The Linux Foundation. All rights reserved.
 * Copyright (C) 2013 Red Hat
 * Author: Rob Clark <robdclark@gmail.com>
 *
@@ -242,7 +242,7 @@ static void blend_setup(struct drm_crtc *crtc)

	/* The reset for blending */
	for (i = STAGE0; i <= STAGE_MAX; i++) {
		if (!pstates[i])
		if (!pstates[i] || !pstates[i]->base.fb)
			continue;

		format = to_mdp_format(
+4 −2
Original line number Diff line number Diff line
/*
 * Copyright (C) 2014-2015 The Linux Foundation. All rights reserved.
 * Copyright (C) 2014-2015, 2018 The Linux Foundation. All rights reserved.
 * Copyright (C) 2013 Red Hat
 * Author: Rob Clark <robdclark@gmail.com>
 *
@@ -218,8 +218,10 @@ mdp5_plane_duplicate_state(struct drm_plane *plane)

	mdp5_state = kmemdup(to_mdp5_plane_state(plane->state),
			sizeof(*mdp5_state), GFP_KERNEL);
	if (!mdp5_state)
		return NULL;

	if (mdp5_state && mdp5_state->base.fb)
	if (mdp5_state->base.fb)
		drm_framebuffer_reference(mdp5_state->base.fb);

	mdp5_state->mode_changed = false;
+3 −4
Original line number Diff line number Diff line
@@ -389,13 +389,12 @@ static void sde_kms_wait_for_commit_done(struct msm_kms *kms,
	struct drm_device *dev;
	int ret;

	if (!kms || !crtc || !crtc->state) {
		SDE_ERROR("invalid params\n");
	dev = crtc->dev;
	if (!dev) {
		SDE_ERROR("invalid dev\n");
		return;
	}

	dev = crtc->dev;

	if (!crtc->state->enable) {
		SDE_DEBUG("[crtc:%d] not enable\n", crtc->base.id);
		return;