Smatch warns that "n_entries" isn't always set. It would trigger a some WARN_ON()s on that path so presumably it can't happen but it's simple enough to initialize it to zero just to silence the warning. Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 8225d223f452..f4951ae33ac2 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -2062,7 +2062,7 @@ u8 intel_ddi_dp_voltage_max(struct intel_encoder *encoder) { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); enum port port = encoder->port; - int n_entries; + int n_entries = 0; if (IS_ICELAKE(dev_priv)) { if (port == PORT_A || port == PORT_B) _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx