]> rtime.felk.cvut.cz Git - vajnamar/linux-xlnx.git/commitdiff
[media] smiapp: Return -EPROBE_DEFER if the clock cannot be obtained
authorSakari Ailus <sakari.ailus@linux.intel.com>
Mon, 29 Aug 2016 20:28:25 +0000 (17:28 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 5 Sep 2016 18:50:46 +0000 (15:50 -0300)
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>
drivers/media/i2c/smiapp/smiapp-core.c

index 92a6859b45ab5c9c13078bc5aae34c7b75c8827b..103e33583f68910e548244bf2b07bef3785d5887 100644 (file)
@@ -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,