Commit 40d42793 authored by Ville Syrjälä's avatar Ville Syrjälä

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: default avatarChris Wilson <chris@chris-wilson.co.uk>
Fixes: 28a30b45 ("drm/i915: Convert cdclk to global state")
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200207152228.1054-1-ville.syrjala@linux.intel.comReviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent f16ccb64
...@@ -12843,11 +12843,13 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state, ...@@ -12843,11 +12843,13 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state,
} }
if (INTEL_GEN(dev_priv) >= 9) { if (INTEL_GEN(dev_priv) >= 9) {
if (mode_changed || crtc_state->update_pipe) if (mode_changed || crtc_state->update_pipe) {
ret = skl_update_scaler_crtc(crtc_state); ret = skl_update_scaler_crtc(crtc_state);
if (!ret) if (ret)
ret = intel_atomic_setup_scalers(dev_priv, crtc, return ret;
crtc_state); }
ret = intel_atomic_setup_scalers(dev_priv, crtc, crtc_state);
if (ret) if (ret)
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment