mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
57171e52b4
commit
1a8c277e8d
1 changed files with 5 additions and 0 deletions
|
|
@ -971,6 +971,11 @@ static int mipid02_probe(struct i2c_client *client)
|
|||
bridge->reset_gpio = devm_gpiod_get_optional(dev, "reset",
|
||||
GPIOD_OUT_HIGH);
|
||||
|
||||
if (IS_ERR(bridge->reset_gpio)) {
|
||||
dev_err(dev, "failed to get reset GPIO\n");
|
||||
return PTR_ERR(bridge->reset_gpio);
|
||||
}
|
||||
|
||||
ret = mipid02_get_regulators(bridge);
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to get regulators %d", ret);
|
||||
|
|
|
|||
Loading…
Reference in a new issue