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 38a5023029 ("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>
This commit is contained in:
Paul Kocialkowski 2021-04-12 09:48:31 +02:00 committed by Mauro Carvalho Chehab
parent cef944c8f5
commit 45dbd70c35
1 changed files with 1 additions and 1 deletions

View File

@ -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;