summaryrefslogtreecommitdiff
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-01-25 11:46:03 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-02-06 10:38:29 +0300
commit38a50230292f232852f4e648d5e0a1cfaf37081b (patch)
tree8fa81e0c6b9a907a2e2255f168f9eb894820c0cd /drivers/media/i2c
parente88ccf09e79cf33cac40316ba69c820d9eebc82b (diff)
downloadlinux-38a50230292f232852f4e648d5e0a1cfaf37081b.tar.xz
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>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/ov5648.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/ov5648.c b/drivers/media/i2c/ov5648.c
index eab7839ea093..dfe38ab8224d 100644
--- a/drivers/media/i2c/ov5648.c
+++ b/drivers/media/i2c/ov5648.c
@@ -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) {