media: v4l: subdev: Return NULL from pad access functions on error
authorSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 25 Oct 2023 10:22:56 +0000 (12:22 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Thu, 23 Nov 2023 17:59:05 +0000 (18:59 +0100)
commit3591c53ae9eccafbeffa9ae2d1899873a5076a87
treee8bfe3481b7fc5b7dfc6956540c81fc5046fdf80
parent34dfd1dd52660dc85d43c92c2cb8029efb2bb8f3
media: v4l: subdev: Return NULL from pad access functions on error

Return NULL from sub-device pad state access functions
(v4l2_subdev_state_get_{format,crop,compose}) for non-existent pads. While
this behaviour differs from older set of pad state information access
functions, we've had a WARN_ON() there for a long time and callers also do
validate the pad index nowadays. Therefore problems are not expected.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/v4l2-core/v4l2-subdev.c