diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-01-25 09:46:03 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-02-06 08:38:29 +0100 |
commit | 38a50230292f232852f4e648d5e0a1cfaf37081b (patch) | |
tree | 8fa81e0c6b9a907a2e2255f168f9eb894820c0cd /drivers/media | |
parent | e88ccf09e79cf33cac40316ba69c820d9eebc82b (diff) | |
download | linux-38a50230292f232852f4e648d5e0a1cfaf37081b.tar.bz2 |
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')
-rw-r--r-- | drivers/media/i2c/ov5648.c | 2 |
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) { |