From: Casey Connolly Date: Thu, 8 Jan 2026 19:52:55 +0000 (+0100) Subject: i2c: geni: bail when clocks can't be enabled X-Git-Tag: v2026.04-rc1~31^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d38ec14953ebe682d4b8af025050a32b5ecb32eb;p=thirdparty%2Fu-boot.git i2c: geni: bail when clocks can't be enabled 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 Link: https://patch.msgid.link/20260108195301.3159260-1-casey.connolly@linaro.org Signed-off-by: Casey Connolly --- diff --git a/drivers/i2c/geni_i2c.c b/drivers/i2c/geni_i2c.c index d29e00fdf41..fbe5ab0ad0c 100644 --- a/drivers/i2c/geni_i2c.c +++ b/drivers/i2c/geni_i2c.c @@ -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;