提交 61c03b63 编写于 作者: C Chuhong Yuan 提交者: Mauro Carvalho Chehab

media: st-mipid02: add a check for devm_gpiod_get_optional

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: NChuhong Yuan <hslester96@gmail.com>
Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
上级 828dbc29
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册