summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDoug Anderson2015-06-04 20:04:36 +0200
committerThierry Reding2015-06-05 13:46:12 +0200
commit6c7e66e617d3cc7eb84ee61deb216dcec4899563 (patch)
tree9b21e88c0ce99992fb81dbfa8f333a51e342d28d /drivers/gpu/drm
parentdrm/panel: simple: Add support for LG LB070WV8 800x480 7" panel (diff)
downloadkernel-qcow2-linux-6c7e66e617d3cc7eb84ee61deb216dcec4899563.tar.gz
kernel-qcow2-linux-6c7e66e617d3cc7eb84ee61deb216dcec4899563.tar.xz
kernel-qcow2-linux-6c7e66e617d3cc7eb84ee61deb216dcec4899563.zip
drm/bridge: dw-hdmi: Return number of EDID modes
The dw_hdmi_connector_get_modes() function accidentally forgets to return the number of modes it added, although it has this information stored in a local variable. Let's fix that. Without this fix, drm_helper_probe_single_connector_modes_merge_bits() could get confused and always call drm_add_modes_noedid(). That's not right. Signed-off-by: Doug Anderson <dianders@chromium.org> Tested-by: Yakir Yang <ykk@rock-chips.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/bridge/dw_hdmi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c
index 594f84c763cf..816d104ca4da 100644
--- a/drivers/gpu/drm/bridge/dw_hdmi.c
+++ b/drivers/gpu/drm/bridge/dw_hdmi.c
@@ -1395,7 +1395,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi,
connector);
struct edid *edid;
- int ret;
+ int ret = 0;
if (!hdmi->ddc)
return 0;
@@ -1412,7 +1412,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
dev_dbg(hdmi->dev, "failed to get edid\n");
}
- return 0;
+ return ret;
}
static enum drm_mode_status