[PATCH 5/6] ARM: am335x: NAND MLO update: always let the user confirm updating
Sascha Hauer
s.hauer at pengutronix.de
Tue Sep 30 06:10:31 PDT 2014
Before actually doing something the user should always confirm the
update. Move the question out of the if() block.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/mach-omap/am33xx_bbu_nand.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap/am33xx_bbu_nand.c b/arch/arm/mach-omap/am33xx_bbu_nand.c
index ed55fd1..ee767d3 100644
--- a/arch/arm/mach-omap/am33xx_bbu_nand.c
+++ b/arch/arm/mach-omap/am33xx_bbu_nand.c
@@ -80,12 +80,12 @@ static int nand_xloadslots_update_handler(struct bbu_handler *handler,
nh = container_of(handler, struct nand_bbu_handler, bbu_handler);
+ ret = bbu_confirm(data);
+ if (ret != 0)
+ return ret;
+
/* check if the devicefile has been overwritten */
if (strcmp(data->devicefile, nh->devicefile[0]) != 0) {
- ret = bbu_confirm(data);
- if (ret != 0)
- return ret;
-
ret = write_image(data->devicefile, image, size);
if (ret != 0)
return ret;
--
2.1.0
More information about the barebox
mailing list