Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1654058 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-05-31 11:40 +0200 |
| Last post | 2017-05-31 11:40 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] [media] tc358743: Handle return value of clk_prepare_enable Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-05-31 11:40 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-05-31 11:40 +0200 |
| Subject | [PATCH] [media] tc358743: Handle return value of clk_prepare_enable |
| Message-ID | <tN8gF-2XV-3@gated-at.bofh.it> |
clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/media/i2c/tc358743.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
index acef4ec..0b30f7b 100644
--- a/drivers/media/i2c/tc358743.c
+++ b/drivers/media/i2c/tc358743.c
@@ -1730,7 +1730,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;
--
1.9.1
Back to top | Article view | linux.kernel
csiph-web