summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@bootlin.com>2018-10-21 18:34:46 +0200
committerMaxime Ripard <maxime.ripard@bootlin.com>2018-10-29 14:19:51 +0100
commit1e0ff648940e603cab6c52cf3723017d30d78f30 (patch)
tree25798489b9f2f5f13da59e462479ffcf6ba5423f /drivers/gpu/drm
parenta25b77a1d79774981d9e8eefbb7d15c05cbd301c (diff)
drm/sun4i: hdmi: Fix double flag assignation
The is_double flag is a boolean currently assigned to the value of the d variable, that is either 1 or 2. It means that this is_double variable is always set to true, even though the initial intent was to have it set to true when d is 2. Fix this. Fixes: 9c5681011a0c ("drm/sun4i: Add HDMI support") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181021163446.29135-2-maxime.ripard@bootlin.com
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
index cd2348554bac..fb985ba1a176 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
@@ -52,7 +52,7 @@ static unsigned long sun4i_tmds_calc_divider(unsigned long rate,
(rate - tmp_rate) < (rate - best_rate)) {
best_rate = tmp_rate;
best_m = m;
- is_double = d;
+ is_double = (d == 2) ? true : false;
}
}
}