git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f98d812
)
clk: clk-uclass: Fix clk_set_default_rates issue
author
Ye Li
<ye.li@nxp.com>
Thu, 11 Sep 2025 10:56:08 +0000
(18:56 +0800)
committer
Fabio Estevam
<festevam@gmail.com>
Sat, 20 Sep 2025 20:46:15 +0000
(17:46 -0300)
clk_set_rate returns the actual clock rate, When assigned clock rate is
higher than 0x7FFFFFFF, the return value will be recognized as error.
Change to IS_ERR_VALUE to check the return value.
Signed-off-by: Ye Li <ye.li@nxp.com>
drivers/clk/clk-uclass.c
patch
|
blob
|
history
diff --git
a/drivers/clk/clk-uclass.c
b/drivers/clk/clk-uclass.c
index
7262e89
..
3dbe1ce
100644
(file)
--- a/
drivers/clk/clk-uclass.c
+++ b/
drivers/clk/clk-uclass.c
@@
-358,7
+358,7
@@
static int clk_set_default_rates(struct udevice *dev,
ret = clk_set_rate(c, rates[index]);
- if (
ret < 0
) {
+ if (
IS_ERR_VALUE(ret)
) {
dev_warn(dev,
"failed to set rate on clock index %d (%ld) (error = %d)\n",
index, clk.id, ret);