diff options
author | Tom Rini <trini@konsulko.com> | 2023-11-29 11:16:13 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-11-29 11:16:13 -0500 |
commit | 6357cf0cc4eaded5326cd10bca359ade2969708a (patch) | |
tree | dc6aec5cbf781b09c13d85c8c2b8b9ef0aa88bde /drivers/timer/timer-uclass.c | |
parent | 339d96822efad9e6e445959224b48375124741d8 (diff) | |
parent | 53a230001263e6aca89e7a1322f2c7adbee4d55e (diff) |
Merge branch '2023-11-29-assorted-platform-updates' into next
- Add a TFTP put test, a few TI Keystone 2 updates, fix stack-protector
for PowerPC, fixes in lib/slre, timer-uclass and pvblock.
Diffstat (limited to 'drivers/timer/timer-uclass.c')
-rw-r--r-- | drivers/timer/timer-uclass.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c index 0c2018bfe3b..60ff65529ab 100644 --- a/drivers/timer/timer-uclass.c +++ b/drivers/timer/timer-uclass.c @@ -66,13 +66,13 @@ static int timer_pre_probe(struct udevice *dev) err = clk_get_by_index(dev, 0, &timer_clk); if (!err) { ret = clk_get_rate(&timer_clk); - if (IS_ERR_VALUE(ret)) - return ret; - uc_priv->clock_rate = ret; - } else { - uc_priv->clock_rate = - dev_read_u32_default(dev, "clock-frequency", 0); + if (!IS_ERR_VALUE(ret)) { + uc_priv->clock_rate = ret; + return 0; + } } + + uc_priv->clock_rate = dev_read_u32_default(dev, "clock-frequency", 0); } return 0; |