aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorArnd Bergmann <[email protected]>2017-10-05 14:08:26 +0200
committerDaniel Vetter <[email protected]>2017-10-05 15:32:15 +0200
commit83482ca3b4fe7312bf3d1f25c7a4e9ff66585eab (patch)
treec8419582694cd3fdcd9cbb88ffd758bceff41064 /tools/perf/scripts/python
parent764d2997ec0edbb48f12e6477ccaceecd999091d (diff)
drm/i915: avoid potential uninitialized variable use
One of the recent changes introduced a warning about undefined behavior in the sanity checking: drivers/gpu/drm/i915/intel_ddi.c: In function 'intel_ddi_hdmi_level': drivers/gpu/drm/i915/intel_ddi.c:654:6: error: 'n_hdmi_entries' may be used uninitialized in this function [-Werror=maybe-uninitialized] It seems that the new cnl specific get_buf_trans functions can return uninitialized data if the voltage level is set to an unexpected value. This changes the code to always return '1' in that error case, which seems like the safest choice as we use one less than the number as an array index later on. Fixes: cc9cabfdec38 ("drm/i915/cnl: Move voltage check into ddi buf trans functions.") Signed-off-by: Arnd Bergmann <[email protected]> [danvet: shut up gcc comment added.] Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions