media: i2c: ov5648: remove unnecessary NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 25 Jan 2021 08:46:03 +0000 (09:46 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 6 Feb 2021 07:38:29 +0000 (08:38 +0100)
commit38a50230292f232852f4e648d5e0a1cfaf37081b
tree8fa81e0c6b9a907a2e2255f168f9eb894820c0cd
parente88ccf09e79cf33cac40316ba69c820d9eebc82b
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>
drivers/media/i2c/ov5648.c