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

Commit 7550c294 authored by Shilun Wan's avatar Shilun Wan Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/shd: fix null pointer dereferenced



Add one safe judging condition for the variable 'm' to avoid null
pointer dereferenced.

Change-Id: I0848b3e56f3d77f0783789b09b4b9e20955dc6a0
Signed-off-by: default avatarShilun Wan <swan@codeaurora.org>
parent 0b5e81a5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -616,6 +616,8 @@ static int shd_connector_get_modes(struct drm_connector *connector,
	drm_mode.vtotal = drm_mode.vsync_end;

	m = drm_mode_duplicate(disp->drm_dev, &drm_mode);
	if (!m)
		return 0;
	drm_mode_set_name(m);
	drm_mode_probed_add(connector, m);
	rc = shd_drm_update_edid_name(&edid, disp->name);