linux/drivers/media/v4l2-core
Christophe JAILLET d7b13edd4c media: v4l2-core: Fix a potential resource leak in v4l2_fwnode_parse_link()
If fwnode_graph_get_remote_endpoint() fails, 'fwnode' is known to be NULL,
so fwnode_handle_put() is a no-op.

Release the reference taken from a previous fwnode_graph_get_port_parent()
call instead.

Also handle fwnode_graph_get_port_parent() failures.

In order to fix these issues, add an error handling path to the function
and the needed gotos.

Fixes: ca50c197bd ("[media] v4l: fwnode: Support generic fwnode for parsing standardised properties")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-07-14 13:20:31 +02:00
..
Kconfig media: Replace dependency on VIDEO_V4L2_SUBDEV_API with select 2022-07-15 15:19:48 +01:00
Makefile media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
tuner-core.c media: Switch i2c drivers back to use .probe() 2023-05-25 16:21:21 +02:00
v4l2-async.c media: v4l: async: Return async sub-devices to subnotifier list 2023-04-11 18:54:00 +02:00
v4l2-common.c media: Add NV15_4L4 pixel format 2023-06-09 16:14:40 +01:00
v4l2-compat-ioctl32.c media: v4l2-core: zero field base in struct v4l2_framebuffer 2023-03-20 00:32:56 +01:00
v4l2-ctrls-api.c media: v4l2-ctrls-api.c: move ctrl->is_new = 1 to the correct line 2023-02-09 09:22:45 +01:00
v4l2-ctrls-core.c media: AV1: Make sure that bit depth in correctly initialize 2023-06-09 16:13:38 +01:00
v4l2-ctrls-defs.c media: Add AV1 uAPI 2023-06-09 16:13:01 +01:00
v4l2-ctrls-priv.h media: v4l2-ctrls: add support for dynamically allocated arrays. 2022-07-15 16:20:53 +01:00
v4l2-ctrls-request.c media: v4l2-ctrls: add support for dynamically allocated arrays. 2022-07-15 16:20:53 +01:00
v4l2-dev.c media: v4l2-dev.c: check for V4L2_CAP_STREAMING to enable streaming ioctls 2023-03-19 22:10:23 +01:00
v4l2-device.c
v4l2-dv-timings.c media: v4l2-dv-timings.c: fix too strict blanking sanity checks 2022-11-23 12:02:30 +00:00
v4l2-event.c
v4l2-fh.c
v4l2-flash-led-class.c media: v4l2-flash: Fix comment typo 2022-08-29 15:32:14 +02:00
v4l2-fwnode.c media: v4l2-core: Fix a potential resource leak in v4l2_fwnode_parse_link() 2023-07-14 13:20:31 +02:00
v4l2-h264.c media: drivers/media/v4l2-core/v4l2-h264 : add detection of null pointers 2023-02-08 07:33:41 +01:00
v4l2-i2c.c
v4l2-ioctl.c media: Add NV15_4L4 pixel format 2023-06-09 16:14:40 +01:00
v4l2-jpeg.c media: v4l2-jpeg: ignore the unknown APP14 marker 2023-02-08 07:25:40 +01:00
v4l2-mc.c media: v4l2-mc: Drop subdev check in v4l2_create_fwnode_links_to_pad() 2023-06-02 18:45:24 +01:00
v4l2-mem2mem.c media: v4l2-mem2mem: use vb2_is_streaming() 2023-02-06 09:00:41 +01:00
v4l2-spi.c
v4l2-subdev-priv.h media: v4l2-core: Make the v4l2-core code enable/disable the privacy LED if present 2023-02-03 10:22:34 +01:00
v4l2-subdev.c media: v4l2-subdev: Add new ioctl for client capabilities 2023-04-15 08:58:41 +01:00
v4l2-trace.c
v4l2-vp9.c media: Add VP9 v4l2 library 2021-11-22 07:47:13 +00:00
videobuf-core.c
videobuf-dma-contig.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
videobuf-dma-sg.c mm/gup: remove vmas parameter from pin_user_pages() 2023-06-09 16:25:26 -07:00
videobuf-vmalloc.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00