Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51d2d72b authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: default avatarSebastian Reichel <sre@kernel.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 697a521f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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,