]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Don't attempt to read an unitialized stack value
authorDamien Lespiau <damien.lespiau@intel.com>
Fri, 12 Jul 2013 15:24:40 +0000 (16:24 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 12 Jul 2013 15:33:21 +0000 (17:33 +0200)
commit2869b7bcc2d15a1a5606e5cc97b99849660d6ae3
tree70d1d2315bc66e6a177489cc6acb674779539465
parente4f5ecb9c1aa3ca4d2a8425f9098bcfd992dcff8
drm/i915: Don't attempt to read an unitialized stack value

If intel_sdvo_get_value() fails here, val is unitialized and the cross
check will compare the pipe config multiplier with a bogus value.

Instead, only set encoder_pixel_multiplier when the sdvo command has
been successful. The cross check will compare the pipe config value with
0 otherwise.

v2: Do the cross check with the initial value of encoder_pixel_multiplier (0)
if the sdvo command fails (and thus keep the warning) (Daniel Vetter)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_sdvo.c