linux/drivers/media/mc
Hans Verkuil 9ef7ee4cb6 media: mc: mark the media devnode as registered from the, start
commit 4bc6073615 upstream.

First the media device node was created, and if successful it was
marked as 'registered'. This leaves a small race condition where
an application can open the device node and get an error back
because the 'registered' flag was not yet set.

Change the order: first set the 'registered' flag, then actually
register the media device node. If that fails, then clear the flag.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Fixes: cf4b9211b5 ("[media] media: Media device node support")
Cc: stable@vger.kernel.org
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-16 13:41:35 +02:00
..
Kconfig media: Request API is no longer experimental 2021-09-30 10:07:55 +02:00
Makefile media: Fix Media Controller API config checks 2021-06-24 14:26:00 +02:00
mc-dev-allocator.c
mc-device.c media: mc: entity: Add iterator helper for entity pads 2022-09-24 09:09:50 +02:00
mc-devnode.c media: mc: mark the media devnode as registered from the, start 2024-06-16 13:41:35 +02:00
mc-entity.c media: mc: Fix graph walk in media_pipeline_start 2024-06-16 13:41:35 +02:00
mc-request.c media: mc-request.c: allow object_bind in QUEUED state 2021-06-02 11:41:54 +02:00