CHROMIUM: drm/exynos: Fix compile warning in dp_core
authorDaniel Kurtz <djkurtz@chromium.org>
Thu, 29 Nov 2012 08:59:20 +0000 (16:59 +0800)
committerGerrit <chrome-bot@google.com>
Fri, 30 Nov 2012 02:54:34 +0000 (18:54 -0800)
commit34a4f5d02b5eaa2711d82b95be5f098e603fa3e7
tree73c706dfca94bdf1ae7922fd32d48aa6251524bc
parenta08b114a1d034a842d151904f31c0f2a72e32f6f
CHROMIUM: drm/exynos: Fix compile warning in dp_core

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>
drivers/gpu/drm/exynos/exynos_dp_core.c