Failing to enable clocks will lead to bus hangs and the board crashing in some cases, let's actually deal with this error and fail probe rather than hoping the clocks are already enabled.
Signed-off-by: Casey Connolly <[email protected]> --- drivers/i2c/geni_i2c.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/geni_i2c.c b/drivers/i2c/geni_i2c.c index d29e00fdf41d..fbe5ab0ad0c6 100644 --- a/drivers/i2c/geni_i2c.c +++ b/drivers/i2c/geni_i2c.c @@ -493,9 +493,11 @@ static int geni_i2c_probe(struct udevice *dev) dev_err(dev, "clk_get_by_name(se) failed: %d\n", ret); return ret; } - geni_i2c_enable_clocks(dev, geni); + ret = geni_i2c_enable_clocks(dev, geni); + if (ret) + return ret; proto = readl(geni->base + GENI_FW_REVISION_RO); proto &= FW_REV_PROTOCOL_MSK; proto >>= FW_REV_PROTOCOL_SHFT; -- 2.51.0

