summaryrefslogtreecommitdiff
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorRicardo Ribalda <ribalda@chromium.org>2026-05-07 20:58:06 +0000
committerHans Verkuil <hverkuil+cisco@kernel.org>2026-05-12 09:39:02 +0200
commit5328dd0ce2d5db943393c9222dbcd2bd41fcba35 (patch)
treeaaa52d633c4a24c447ede14c90b67fffdecabd22 /drivers/media/i2c
parentd5b50055338e131a1a99f923ebb0361974a00f36 (diff)
media: v4l2-dev: Add range check for vdev->minor
If the fixed minor ranges are not properly set we could end up in a situation where the calculated minor is invalid. Add a check for this in the code to make it more robust. This check also fixes the following false positive smatch warning: drivers/media/v4l2-core/v4l2-dev.c:1036 __video_register_device() error: buffer overflow 'video_devices' 256 <= 288 drivers/media/v4l2-core/v4l2-dev.c:1043 __video_register_device() error: buffer overflow 'video_devices' 256 <= 288 drivers/media/v4l2-core/v4l2-dev.c:1101 __video_register_device() error: buffer overflow 'video_devices' 256 <= 288 Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'drivers/media/i2c')
0 files changed, 0 insertions, 0 deletions