drm/panthor: Fix off by one in panthor_fw_get_cs_iface()
authorDan Carpenter <dan.carpenter@linaro.org>
Tue, 2 Apr 2024 09:56:42 +0000 (12:56 +0300)
committerBoris Brezillon <boris.brezillon@collabora.com>
Wed, 3 Apr 2024 07:06:28 +0000 (09:06 +0200)
commit2b5890786014b926f845402ae80ebc71c4bd6d5c
treec4df5a944e906bcc48c7ef1731173e2c1e023b8b
parent99b74db1e27145bdf0afb85559aa70d951569ac3
drm/panthor: Fix off by one in panthor_fw_get_cs_iface()

The ->iface.streams[csg_slot][] array has MAX_CS_PER_CSG elements so
this > comparison needs to be >= to prevent an out of bounds access.

Fixes: 2718d91816ee ("drm/panthor: Add the FW logical block")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/62835c16-c85c-483d-a8fe-63be78d49d15@moroto.mountain
drivers/gpu/drm/panthor/panthor_fw.c