提交 51d2d72b 编写于 作者: S Sakari Ailus 提交者: Mauro Carvalho Chehab

[media] smiapp: Return -EPROBE_DEFER if the clock cannot be obtained

The clock may be provided by a driver which is yet to probe. Print the
actual error code as well.
Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: NSebastian Reichel <sre@kernel.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 697a521f
...@@ -2557,8 +2557,9 @@ static int smiapp_init(struct smiapp_sensor *sensor) ...@@ -2557,8 +2557,9 @@ static int smiapp_init(struct smiapp_sensor *sensor)
if (!sensor->hwcfg->set_xclk) { if (!sensor->hwcfg->set_xclk) {
sensor->ext_clk = devm_clk_get(&client->dev, NULL); sensor->ext_clk = devm_clk_get(&client->dev, NULL);
if (IS_ERR(sensor->ext_clk)) { if (IS_ERR(sensor->ext_clk)) {
dev_err(&client->dev, "could not get clock\n"); dev_err(&client->dev, "could not get clock (%ld)\n",
return PTR_ERR(sensor->ext_clk); PTR_ERR(sensor->ext_clk));
return -EPROBE_DEFER;
} }
rval = clk_set_rate(sensor->ext_clk, rval = clk_set_rate(sensor->ext_clk,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册