diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-05-31 06:31:54 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-06-07 09:28:05 -0300 |
commit | 43b288baa8f39054dc5e7102a329180bbeb1e115 (patch) | |
tree | 8bbf4883e8bdf1b5b730798b78619fa363c96955 | |
parent | 48e3e36a253c66d47843ebe78422cec30095e3d5 (diff) | |
download | op-kernel-dev-43b288baa8f39054dc5e7102a329180bbeb1e115.zip op-kernel-dev-43b288baa8f39054dc5e7102a329180bbeb1e115.tar.gz |
[media] tc358743: Handle return value of clk_prepare_enable
clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | drivers/media/i2c/tc358743.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c index 3e5b090..8f8bb9e 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -1731,7 +1731,11 @@ static int tc358743_probe_of(struct tc358743_state *state) state->bus = endpoint->bus.mipi_csi2; - clk_prepare_enable(refclk); + ret = clk_prepare_enable(refclk); + if (ret) { + dev_err(dev, "Failed! to enable clock\n"); + goto free_endpoint; + } state->pdata.refclk_hz = clk_get_rate(refclk); state->pdata.ddc5v_delay = DDC5V_DELAY_100_MS; |