Skip to content
Commit 4bc60736 authored by Hans Verkuil's avatar Hans Verkuil
Browse files

media: mc: mark the media devnode as registered from the, start



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: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fixes: cf4b9211

 ("[media] media: Media device node support")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
parent e671a83f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment