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: 9c5681011a ("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
This commit is contained in:
Maxime Ripard 2018-10-21 18:34:46 +02:00
parent a25b77a1d7
commit 1e0ff64894
No known key found for this signature in database
GPG Key ID: E3EF0D6F671851C5
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ static unsigned long sun4i_tmds_calc_divider(unsigned long rate,
(rate - tmp_rate) < (rate - best_rate)) { (rate - tmp_rate) < (rate - best_rate)) {
best_rate = tmp_rate; best_rate = tmp_rate;
best_m = m; best_m = m;
is_double = d; is_double = (d == 2) ? true : false;
} }
} }
} }