From: Dan Carpenter <dan.carpenter@oracle.com>
To: Daniel Vetter <daniel.vetter@intel.com>,
Chandra Konduru <chandra.konduru@intel.com>
Cc: intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: [patch] drm/i915: return false on failure in intel_dp_compute_config()
Date: Thu, 23 Feb 2017 10:39:57 +0000 [thread overview]
Message-ID: <20170223103956.GA27484@mwanda> (raw)
This function is a bool type where we are supposed to return false on
failure and true on success. Negative error codes are currently treated
as true.
Fixes: a1b2278e4dfc ("drm/i915: skylake panel fitting using shared scalers")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index d1670b8afbf5..9173548ba601 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1637,10 +1637,8 @@ intel_dp_compute_config(struct intel_encoder *encoder,
adjusted_mode);
if (INTEL_GEN(dev_priv) >= 9) {
- int ret;
- ret = skl_update_scaler_crtc(pipe_config);
- if (ret)
- return ret;
+ if (skl_update_scaler_crtc(pipe_config))
+ return false;
}
if (HAS_GMCH_DISPLAY(dev_priv))
next reply other threads:[~2017-02-23 10:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 10:39 Dan Carpenter [this message]
2017-02-23 11:09 ` [Intel-gfx] [patch] drm/i915: return false on failure in intel_dp_compute_config() Joonas Lahtinen
2017-02-23 11:20 ` Dan Carpenter
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=20170223103956.GA27484@mwanda \
--to=dan.carpenter@oracle.com \
--cc=chandra.konduru@intel.com \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
/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