blob: 7610adc26916d67786bae9bd2d464d4d67ea64f5 [file] [log] [blame]
From 5b9c4e8bc61c2700fc54c9e8257f08139c7a10d5 Mon Sep 17 00:00:00 2001
From: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Date: Sun, 2 Jun 2019 17:22:15 -0400
Subject: [PATCH] media: ov6650: Fix device node exposed without proper locking
commit 5c49ac3ac6562a39baa2aece050a14b661197036 upstream.
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>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c
index bf6893c8a32a..af482620f94a 100644
--- a/drivers/media/i2c/ov6650.c
+++ b/drivers/media/i2c/ov6650.c
@@ -1042,7 +1042,6 @@ static int ov6650_probe(struct i2c_client *client,
priv->tpf.denominator = FRAME_RATE_MAX;
priv->subdev.internal_ops = &ov6650_internal_ops;
- priv->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
ret = v4l2_async_register_subdev(&priv->subdev);
if (!ret)
--
2.27.0