Skip to content
Commit 354cf003 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

media: cec: mark devnode as registered before actually registering it



The cec device node can be used right after it was created, but that
leaves a race condition where the device was created, but devnode->registered
was still false. So an ioctl() would result in an error.

So set it to true before calling cdev_device_add() and to false again if
cdev_device_add returned an error.

Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 9390467c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment