]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
i2c: geni: bail when clocks can't be enabled
authorCasey Connolly <casey.connolly@linaro.org>
Thu, 8 Jan 2026 19:52:55 +0000 (20:52 +0100)
committerCasey Connolly <casey.connolly@linaro.org>
Wed, 14 Jan 2026 15:25:09 +0000 (16:25 +0100)
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.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260108195301.3159260-1-casey.connolly@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
drivers/i2c/geni_i2c.c

index d29e00fdf41df1d7a95d8d9b3b98f784f5b2a3e1..fbe5ab0ad0c6ede8c2eadea6c8c91d1a375a4184 100644 (file)
@@ -494,7 +494,9 @@ static int geni_i2c_probe(struct udevice *dev)
                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;