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:
08bff30
)
ram: sifive: Check return value on clk_enable()
author
Bin Meng
<bin.meng@windriver.com>
Tue, 15 Sep 2020 08:05:06 +0000
(16:05 +0800)
committer
Andes
<uboot@andestech.com>
Wed, 30 Sep 2020 00:54:38 +0000
(08:54 +0800)
The return value should be checked otherwise it's useless to
assign the return value to 'ret'.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
drivers/ram/sifive/fu540_ddr.c
patch
|
blob
|
history
diff --git
a/drivers/ram/sifive/fu540_ddr.c
b/drivers/ram/sifive/fu540_ddr.c
index
5ff8869
..
f5b2873
100644
(file)
--- a/
drivers/ram/sifive/fu540_ddr.c
+++ b/
drivers/ram/sifive/fu540_ddr.c
@@
-369,6
+369,11
@@
static int fu540_ddr_probe(struct udevice *dev)
}
ret = clk_enable(&priv->ddr_clk);
+ if (ret < 0) {
+ debug("Could not enable DDR clock\n");
+ return ret;
+ }
+
priv->ctl = regmap_get_range(map, 0);
priv->phy = regmap_get_range(map, 1);
priv->physical_filter_ctrl = regmap_get_range(map, 2);