Message ID | 1472648277-25888-1-git-send-email-sakari.ailus@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi, On Wed, Aug 31, 2016 at 03:57:57PM +0300, Sakari Ailus wrote: > 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> > > --- > since v1: > - Add printing of the original error code Reviewed-By: Sebastian Reichel <sre@kernel.org>
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 92a6859..103e335 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,
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> --- since v1: - Add printing of the original error code drivers/media/i2c/smiapp/smiapp-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)