media: ti-vpe: cal: Iterate over correct number of CAMERARX instances
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 6 Dec 2020 23:53:35 +0000 (00:53 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 4 Jan 2021 10:32:53 +0000 (11:32 +0100)
commit71c1f16ddd528db3955414316ba2ce2730ff7455
tree13a4ee26a02fcb54768566fe4fec5ccfd90b28f2
parent695baaa373abf407214b117c0f24e43307388ac4
media: ti-vpe: cal: Iterate over correct number of CAMERARX instances

When performing operations on all CAMERARX instances, code usually
iterates over all cal->phy[] entries and skips the NULL pointers. The
number of available CAMERARX instances is however available through
cal->data->num_csi2_phy. Use it instead.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/ti-vpe/cal.c