diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2016-08-29 17:28:25 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-05 15:50:46 -0300 |
commit | 51d2d72b669dab689f18923ec2aba24bc3ccc161 (patch) | |
tree | 77db1285dcf66cb9794c0175d642bb17716878fd /drivers/media/i2c | |
parent | 697a521fbc6dd6f64489d0feeb09631b227fcd67 (diff) | |
download | linux-51d2d72b669dab689f18923ec2aba24bc3ccc161.tar.bz2 |
[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: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/smiapp/smiapp-core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 92a6859b45ab..103e33583f68 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -2557,8 +2557,9 @@ static int smiapp_init(struct smiapp_sensor *sensor) if (!sensor->hwcfg->set_xclk) { sensor->ext_clk = devm_clk_get(&client->dev, NULL); if (IS_ERR(sensor->ext_clk)) { - dev_err(&client->dev, "could not get clock\n"); - return PTR_ERR(sensor->ext_clk); + dev_err(&client->dev, "could not get clock (%ld)\n", + PTR_ERR(sensor->ext_clk)); + return -EPROBE_DEFER; } rval = clk_set_rate(sensor->ext_clk, |