]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: ov6650: Fix device node exposed without proper locking
authorJanusz Krzysztofik <jmkrzyszt@gmail.com>
Sun, 2 Jun 2019 21:22:15 +0000 (17:22 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 21 Jun 2019 21:53:25 +0000 (17:53 -0400)
Commit c62b96050bee ("media: ov6650: Register with asynchronous
subdevice framework") carelessly requested creation of a video device
node by setting a V4L2_SUBDEV_FL_HAS_DEVNODE flag.  The driver is not
ready for that as it doesn't implement proper locking required for
serialization of IOCTLs.

Fix it by dropping the flag assignment.

Fixes: c62b96050bee ("media: ov6650: Register with asynchronous subdevice framework")
Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/ov6650.c

index 1b972e591b480a0ee4b2e0279e93fa8f831f19e0..ace95ba7dd19a3092a5957e410fefdffa98580ea 100644 (file)
@@ -1009,7 +1009,6 @@ static int ov6650_probe(struct i2c_client *client,
        priv->colorspace  = V4L2_COLORSPACE_JPEG;
 
        priv->subdev.internal_ops = &ov6650_internal_ops;
-       priv->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
 
        ret = v4l2_async_register_subdev(&priv->subdev);
        if (ret)