[Intel-gfx] [PATCH i-g-t] kms_atomic: drop unnecessary connector looping from plane_primary test

Daniel Stone daniels at collabora.com
Fri Feb 26 17:00:21 UTC 2016


On Fri, 2016-02-26 at 08:58 -0800, Matt Roper wrote:
> Local variable num_connectors is never initialized before being
> auto-incremented in the loop.  If we wind up with a non-zero garbage
> value, it will lead us to try to write to an out-of-bounds array
> index.
> We should probably initialize it to zero before use.
> However on closer inspection, the plane_primary test doesn't actually
> wind up using the connector list or number of connectors, so just
> remove
> the whole block of code; it was probably brought in by accident as
> part
> of a copy-paste operation.

History rather than copy & paste; originally crtc_commit_*() was
inlined. But the rest of your analysis is totally correct; thanks for
finding this!

Reviewed-by: Daniel Stone <daniels at collabora.com>


More information about the Intel-gfx mailing list