media: ov7740: Check for possible NULL return value in control creation
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 12 Apr 2018 10:14:26 +0000 (06:14 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 23 Apr 2018 17:57:32 +0000 (13:57 -0400)
commitbad04a55ab1fadfeb83999d338e7fe511d2edfd9
treecebc63371e4017376e843b681ead5f63bd68e0d4
parent31b9cb6ecd0128a165fe2b437ef63a6fa744de7b
media: ov7740: Check for possible NULL return value in control creation

Check that creating the control actually succeeded before accessing it.
A failure would lead to NULL pointer reference. Fix this.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/i2c/ov7740.c