]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Don't use uninitialized 'ret'
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 7 Feb 2020 15:22:28 +0000 (17:22 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 11 Feb 2020 18:39:10 +0000 (20:39 +0200)
commit0525637e98bed33f0401da1f09502d331a2e4230
tree6c9393aa304a350e6dbb3199a8b31d8d892d2e5a
parent2b9df85b61ac93be85b502e0a26341694cdc3ce6
drm/i915: Don't use uninitialized 'ret'

Accidentally removed the 'ret=0' initialization, and thus
we're potentially looking at some stack garbage here.

The whole 'ret = do_stuff; if (!ret) do_other_stuff;' pattern
confuses my brain so let's replace it with the standard
immediate return thing.

Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: 2f81cdcd2a21 ("drm/i915: Convert cdclk to global state")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200207152228.1054-1-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/display/intel_display.c