media: st-mipid02: add a check for devm_gpiod_get_optional
authorChuhong Yuan <hslester96@gmail.com>
Fri, 18 Oct 2019 01:46:56 +0000 (22:46 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:44:17 +0000 (16:44 +0100)
commit1a8c277e8d95c0f3f8579f94e4f35a90251f0fb2
tree3770cb7bcdc71929a1876064b3ac64b9b13ede68
parent57171e52b492dd517284b5c330b96528a89c3ccd
media: st-mipid02: add a check for devm_gpiod_get_optional

[ Upstream commit 61c03b631b74a38ab53753f3ee971a55886d4843 ]

mipid02_probe misses a check for devm_gpiod_get_optional and may miss
the failure.
Add a check to fix the problem.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/i2c/st-mipid02.c