Skip to content
Snippets Groups Projects
Commit 1c431c11 authored by Liu Ying's avatar Liu Ying Committed by Leonard Crestez
Browse files

MLK-16240 drm/bridge: it6263: Don't use freed edid structure in ->get_modes()


We call the helper drm_detect_hdmi_monitor() to check if the EDID blob read
from a monitor indicates the monitor is connected via HDMI or not.  We pass
an edid structure to the helper.  However, the structure has been freed
before we use it.  This patch moves the helper up before the structure is
freed to fix the issue.

Fixes: a5c01aa91842 ("MLK-15001-25 drm/bridge: Add ITE IT6263 LVDS to HDMI transmitter support")
Signed-off-by: default avatarLiu Ying <victor.liu@nxp.com>
(cherry picked from commit 3522359b)
parent 038581b5
No related merge requests found
...@@ -473,6 +473,7 @@ static int it6263_get_modes(struct drm_connector *connector) ...@@ -473,6 +473,7 @@ static int it6263_get_modes(struct drm_connector *connector)
drm_connector_update_edid_property(connector, edid); drm_connector_update_edid_property(connector, edid);
if (edid) { if (edid) {
num = drm_add_edid_modes(connector, edid); num = drm_add_edid_modes(connector, edid);
it6263->is_hdmi = drm_detect_hdmi_monitor(edid);
kfree(edid); kfree(edid);
} }
...@@ -481,8 +482,6 @@ static int it6263_get_modes(struct drm_connector *connector) ...@@ -481,8 +482,6 @@ static int it6263_get_modes(struct drm_connector *connector)
if (ret) if (ret)
return ret; return ret;
it6263->is_hdmi = drm_detect_hdmi_monitor(edid);
return num; return num;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment