Commit 38a50230 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent e88ccf09
...@@ -2338,7 +2338,7 @@ static int ov5648_enum_frame_interval(struct v4l2_subdev *subdev, ...@@ -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; return -EINVAL;
switch (interval_enum->code) { switch (interval_enum->code) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment