aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas2020-04-02 10:37:52 +0200
committerDaniel Schwierzeck2020-04-27 20:29:33 +0200
commitb9ec102bc47fbc6017bd6fa2ce56b0c61cc30047 (patch)
tree0e84b9e28c0aa2263352e93f436b1ad8c0677747 /drivers
parentd16d37bcd4087b8ea0f66cb76a73edad182d151a (diff)
nand: brcmnand: return without disabling clock
Linux Broadcom NAND driver only disabled clock if no childs are initialized. This section of the code seems to have been accidentally dropped when it was imported in U-Boot. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/raw/brcmnand/brcmnand.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
index 5232328e1e4..7bdebf58699 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -2714,6 +2714,14 @@ int brcmnand_probe(struct udevice *dev, struct brcmnand_soc *soc)
}
#endif /* __UBOOT__ */
+ /* No chip-selects could initialize properly */
+ if (list_empty(&ctrl->host_list)) {
+ ret = -ENODEV;
+ goto err;
+ }
+
+ return 0;
+
err:
#ifndef __UBOOT__
clk_disable_unprepare(ctrl->clk);
@@ -2722,7 +2730,6 @@ err:
clk_disable(ctrl->clk);
#endif /* __UBOOT__ */
return ret;
-
}
EXPORT_SYMBOL_GPL(brcmnand_probe);