WSL2-Linux-Kernel/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
..
Makefile media: ti-vpe: cal: Split CAMERARX handling to cal-camerarx.c 2020-07-19 10:40:43 +02:00
cal-camerarx.c media: ti-vpe: cal: allow more than 1 source pads 2021-07-12 14:22:11 +02:00
cal-video.c media: ti-vpe: cal: allow more than 1 source pads 2021-07-12 14:22:11 +02:00
cal.c media: ti-vpe: cal: fix indexing of cal->ctx[] in cal_probe() 2021-07-22 14:01:55 +02:00
cal.h media: ti-vpe: cal: add embedded data support 2021-07-12 14:22:11 +02:00
cal_regs.h media: ti-vpe: cal: add vc and datatype fields to cal_ctx 2021-07-12 13:14:50 +02:00
csc.c media: ti-vpe: csc: remove redundant dev_err call in csc_create() 2021-04-06 16:09:16 +02:00
csc.h media: ti-vpe: vpe: don't rely on colorspace member for conversion 2019-10-10 13:54:22 -03:00
sc.c media: ti-vpe: sc: remove redundant dev_err call in sc_create() 2021-04-06 16:09:31 +02:00
sc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sc_coeff.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vpdma.c media: ti-vpe: Simplify bool comparison 2021-03-11 11:59:44 +01:00
vpdma.h media: ti-vpe: vpe: fix a v4l2-compliance failure about invalid sizeimage 2019-10-10 13:49:02 -03:00
vpdma_priv.h media: ti-vpe: vpdma: Use fixed type for address in descriptor 2019-10-10 13:50:36 -03:00
vpe.c media: ti-vpe: use pm_runtime_resume_and_get() 2021-05-20 16:02:44 +02:00
vpe_regs.h media: use the BIT() macro 2019-08-26 14:08:50 -03:00