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

Commit 28fcff9e authored by Fuad Hossain's avatar Fuad Hossain Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/dp: remove mst connector properly during uninstall



In the mst connector uninstall function, the
previous implementation removed the connector
from the mst connector list using its id.
However, by the time the execution path reaches
this function, the id has already been cleared
from the connector data structure, therefore the
list never got cleared. To resolve this, the
connector should be identified using pointer
comparison. This patch also includes a small
change to the size of the input buffer for the
mst write edid modes function to allow for long
input configurations.

CRs-Fixed: 2328500
Change-Id: I4b1af0afdbb55542c8ddbc0751083ab7810be53f
Signed-off-by: default avatarFuad Hossain <fhossain@codeaurora.org>
parent 38454009
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -372,7 +372,7 @@ static ssize_t dp_debug_write_edid_modes_mst(struct file *file,
{
	struct dp_debug_private *debug = file->private_data;
	struct dp_mst_connector *mst_connector;
	char buf[SZ_32];
	char buf[SZ_512];
	char *read_buf;
	size_t len = 0;

@@ -386,7 +386,7 @@ static ssize_t dp_debug_write_edid_modes_mst(struct file *file,
	if (*ppos)
		goto end;

	len = min_t(size_t, count, SZ_32 - 1);
	len = min_t(size_t, count, SZ_512 - 1);
	if (copy_from_user(buf, user_buff, len))
		goto end;

+1 −1
Original line number Diff line number Diff line
@@ -2053,7 +2053,7 @@ static int dp_display_mst_connector_uninstall(struct dp_display *dp_display,

	list_for_each_entry_safe(con_to_remove, temp_con,
			&dp->debug->dp_mst_connector_list.list, list) {
		if (con_to_remove->con_id == connector->base.id) {
		if (con_to_remove->conn == connector) {
			list_del(&con_to_remove->list);
			kfree(con_to_remove);
		}