diff options
| author | Casey Connolly <[email protected]> | 2026-01-08 20:52:55 +0100 |
|---|---|---|
| committer | Casey Connolly <[email protected]> | 2026-01-14 16:25:09 +0100 |
| commit | d38ec14953ebe682d4b8af025050a32b5ecb32eb (patch) | |
| tree | b7c821e325a9301c958c51ee10fa424a9322f315 /drivers | |
| parent | 142df62cb68dae574632640682b9e035ff076720 (diff) | |
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 <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Casey Connolly <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/i2c/geni_i2c.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |
