linux-bl808/drivers/media/platform/ti-vpe
Tom Rix fa0b565859 media: ti-vpe: cal: fix indexing of cal->ctx[] in cal_probe()
cal->ctx[i] is allocated with this loop
	for (i = 0; i < cal->data->num_csi2_phy; ++i) {
and accessed in the error handler and else where with this loop
	for (i = 0; i < cal->num_contexts; i++)
Because the first loop contains a continue statement
before cal->num_contexts is incremented, using i as the
indexer will leave gaps in the cal->ctx[].

So use cal->num_contexts as the indexer.

Fixes: 75e7e58bfa ("media: ti-vpe: cal: support 8 DMA contexts")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-07-22 14:01:55 +02:00
..
cal-camerarx.c
cal-video.c
cal.c media: ti-vpe: cal: fix indexing of cal->ctx[] in cal_probe() 2021-07-22 14:01:55 +02:00
cal.h
cal_regs.h
csc.c
csc.h
Makefile
sc.c
sc.h
sc_coeff.h
vpdma.c
vpdma.h
vpdma_priv.h
vpe.c
vpe_regs.h