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>
}
#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);
clk_disable(ctrl->clk);
#endif /* __UBOOT__ */
return ret;
-
}
EXPORT_SYMBOL_GPL(brcmnand_probe);