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

Commit 43b288ba authored by Arvind Yadav's avatar Arvind Yadav Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 48e3e36a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;