summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/ov2680.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/i2c/ov2680.c')
-rw-r--r--drivers/media/i2c/ov2680.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/i2c/ov2680.c b/drivers/media/i2c/ov2680.c
index 5de332e5d87d..faaf8b10632f 100644
--- a/drivers/media/i2c/ov2680.c
+++ b/drivers/media/i2c/ov2680.c
@@ -831,6 +831,9 @@ static int ov2680_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
struct ov2680_dev *sensor = to_ov2680_dev(sd);
int val;
+ if (!sensor->is_enabled)
+ return 0;
+
switch (ctrl->id) {
case V4L2_CID_AUTOGAIN:
if (!ctrl->val)