summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2017-07-24 14:26:51 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-09-20 18:16:19 +0200
commitfbf8e53d45685e8127551244ffee1ec2af3812f0 (patch)
treeb2fa9ce73ab8a7cd0d6ba5d5b786bdbe1b6a1825
parent3c78ca018c6f73732550f9d9c43eae355e8e8c95 (diff)
dp.c: fix compilation with gcc 7
With gcc 7 the following compile time error occurs: | drivers/video/tegra/dc/dp.c:1178:12: error: the omitted middle operand in ?: will always be 'true', suggest explicit middle operand [-Werror=parentheses] | cr_done ? : ({ret = -EINVAL; goto fail; }); | ^ | drivers/video/tegra/dc/dp.c:1186:12: error: the omitted middle operand in ?: will always be 'true', suggest explicit middle operand [-Werror=parentheses] | lt_done ? : ({ret = -EINVAL; goto fail; }); | ^ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--drivers/video/tegra/dc/dp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/video/tegra/dc/dp.c b/drivers/video/tegra/dc/dp.c
index 348c0d7ca176..943e3f115d80 100644
--- a/drivers/video/tegra/dc/dp.c
+++ b/drivers/video/tegra/dc/dp.c
@@ -1175,7 +1175,10 @@ static int _tegra_dp_fast_lt(struct tegra_dc_dp_data *dp,
tegra_dp_tpg(dp, TRAINING_PATTERN_1, n_lanes);
tegra_dp_wait_aux_training(dp, true);
cr_done = tegra_dp_clock_recovery_status(dp);
- cr_done ? : ({ret = -EINVAL; goto fail; });
+ if (!cr_done) {
+ ret = -EINVAL;
+ goto fail;
+ }
if (cfg->tps3_supported)
tegra_dp_tpg(dp, TRAINING_PATTERN_3, n_lanes);
@@ -1183,7 +1186,10 @@ static int _tegra_dp_fast_lt(struct tegra_dc_dp_data *dp,
tegra_dp_tpg(dp, TRAINING_PATTERN_2, n_lanes);
tegra_dp_wait_aux_training(dp, false);
lt_done = tegra_dp_lt_status(dp);
- lt_done ? : ({ret = -EINVAL; goto fail; });
+ if (!lt_done) {
+ ret = -EINVAL;
+ goto fail;
+ }
cfg->lt_data_valid = true;