media: i2c: ov5648: remove unnecessary NULL check

The "mode_index == ARRAY_SIZE(ov5648_modes)" check ensures that we
exited the loop via a break statement so we know that "mode" must
be valid.  Delete this unnecessary NULL check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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:
Dan Carpenter 2021-01-25 09:46:03 +01:00 committed by Mauro Carvalho Chehab
parent e88ccf09e7
commit 38a5023029
1 changed files with 1 additions and 1 deletions

View File

@ -2338,7 +2338,7 @@ static int ov5648_enum_frame_interval(struct v4l2_subdev *subdev,
}
}
if (mode_index == ARRAY_SIZE(ov5648_modes) || !mode)
if (mode_index == ARRAY_SIZE(ov5648_modes))
return -EINVAL;
switch (interval_enum->code) {