Skip to content

Commit

Permalink
media: i2c: ov8865: remove unnecessary NULL check
Browse files Browse the repository at this point in the history
The check on mode_index is sufficient to ensure that we have a
valid mode. Remove the explicit mode check similarly to
commit 38a5023 ("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>
  • Loading branch information
Paul Kocialkowski authored and Mauro Carvalho Chehab committed Jun 2, 2021
1 parent cef944c commit 45dbd70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/i2c/ov8865.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 45dbd70

Please sign in to comment.