In function 'exynos_dp_hotplug':
warning: 'voltage_swing' may be used uninitialized in this function
[-Wmaybe-uninitialized]
While it may be impossible for dp->link_train.lane_count to be 0, the
compiler can't know that. If it is 0 for some reason, then voltage_swing
does not get set in the lane loop and therefore
exynos_dp_check_max_cr_loop() gets called with a bogus voltage_swing.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:36770
TEST=builds without the warning
Change-Id: Ia19a0439487995bd600570e0f32bf4a4c31e4407
Reviewed-on: https://gerrit.chromium.org/gerrit/38901
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
return ret;
lane_count = dp->link_train.lane_count;
+ if (lane_count == 0)
+ return 0;
+
adjust_request = link_status + 4;
if (exynos_dp_clock_recovery_ok(link_status, lane_count) == 0) {