From d38ec14953ebe682d4b8af025050a32b5ecb32eb Mon Sep 17 00:00:00 2001 From: Casey Connolly Date: Thu, 8 Jan 2026 20:52:55 +0100 Subject: [PATCH] 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 --- 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 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;