From: Doug Anderson <dianders@chromium.org>
To: Philipp Zabel <p.zabel@pengutronix.de>,
Russell King <rmk+kernel@arm.linux.org.uk>,
Thierry Reding <treding@nvidia.com>
Cc: Doug Anderson <dianders@chromium.org>,
airlied@linux.ie, andy.yan@rock-chips.com, ykk@rock-chips.com,
fabio.estevam@freescale.com, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] drm: bridge/dw_hdmi: Return num_modes in dw_hdmi_connector_get_modes
Date: Thu, 4 Jun 2015 11:04:36 -0700 [thread overview]
Message-ID: <1433441076-20049-1-git-send-email-dianders@chromium.org> (raw)
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>
---
drivers/gpu/drm/bridge/dw_hdmi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c
index 594f84c..816d104 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
--
2.2.0.rc0.207.ga3a616c
next reply other threads:[~2015-06-04 18:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-04 18:04 Doug Anderson [this message]
2015-06-05 10:02 ` Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1433441076-20049-1-git-send-email-dianders@chromium.org \
--to=dianders@chromium.org \
--cc=airlied@linux.ie \
--cc=andy.yan@rock-chips.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=fabio.estevam@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=treding@nvidia.com \
--cc=ykk@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®