samsung7305: guard frame-list walk against scan-build false positive

scan-build flags ordered->next as a possible null deref because it
cannot correlate the GSList length with frames_captured. The
frames_captured >= MIN_FRAMES guard upstream of the head drop makes
the deref safe in practice, but adding an explicit ordered &&
ordered->next check silences the analyzer without changing behavior.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Justin Hall 2026-04-23 14:18:00 -04:00
parent 0067205059
commit 7912a0cb26

View file

@ -1158,7 +1158,7 @@ m_loop_state (FpiSsm *ssm, FpDevice *dev)
self->frames_captured);
}
if (self->frames_captured >= 2)
if (self->frames_captured >= 2 && ordered && ordered->next)
{
/* Fixed stride instead of motion estimation — see the note
* near ASSEMBLE_STRIDE. First frame's delta_y is forced to 0