提交 9a45bf28 编写于 作者: F Fabio Estevam 提交者: Mauro Carvalho Chehab

media: max2175: Propagate the real error on devm_clk_get() failure

When devm_clk_get() fails we should return the real error code
instead of always returning -ENODEV.

This allows defer probe to happen in the case the clock provider has
not been enabled by the time max2175 driver gets probed.
Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 82cf5f4f
...@@ -1319,7 +1319,7 @@ static int max2175_probe(struct i2c_client *client, ...@@ -1319,7 +1319,7 @@ static int max2175_probe(struct i2c_client *client,
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
ret = PTR_ERR(clk); ret = PTR_ERR(clk);
dev_err(&client->dev, "cannot get clock %d\n", ret); dev_err(&client->dev, "cannot get clock %d\n", ret);
return -ENODEV; return ret;
} }
regmap = devm_regmap_init_i2c(client, &max2175_regmap_config); regmap = devm_regmap_init_i2c(client, &max2175_regmap_config);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册