summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>2021-04-12 09:48:31 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-06-02 12:02:00 +0200
commit45dbd70c35d6a5fec4b7b45cde75b1341ede52a2 (patch)
tree9cf52026a9359bbe9122a4255addf358b9b2b915
parentcef944c8f5ae192636f53682797d62bd61859646 (diff)
media: i2c: ov8865: remove unnecessary NULL check
The check on mode_index is sufficient to ensure that we have a valid mode. Remove the explicit mode check similarly to commit 38a50230292f ("media: i2c: ov5648: remove unnecessary NULL check") Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--drivers/media/i2c/ov8865.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/ov8865.c b/drivers/media/i2c/ov8865.c
index 3bf6ee4898a9..b16c82559800 100644
--- a/drivers/media/i2c/ov8865.c
+++ b/drivers/media/i2c/ov8865.c
@@ -2689,7 +2689,7 @@ static int ov8865_enum_frame_interval(struct v4l2_subdev *subdev,
}
}
- if (mode_index == ARRAY_SIZE(ov8865_modes) || !mode)
+ if (mode_index == ARRAY_SIZE(ov8865_modes))
return -EINVAL;
interval_enum->interval = mode->frame_interval;