summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap/am33xx_bbu_nand.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-09-30 15:06:07 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-09-30 15:06:10 +0200
commit36a744ed79b02f9abb8d2d1e148ae9576a669059 (patch)
tree2167de70ddcda9fb7b88b814f3cdb6b8ab9624ec /arch/arm/mach-omap/am33xx_bbu_nand.c
parent71417412e208ba216894c16377b0e94459fe59b5 (diff)
downloadbarebox-36a744ed79b02f9abb8d2d1e148ae9576a669059.tar.gz
barebox-36a744ed79b02f9abb8d2d1e148ae9576a669059.tar.xz
ARM: am335x: NAND MLO update: always let the user confirm updating
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@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-omap/am33xx_bbu_nand.c')
-rw-r--r--arch/arm/mach-omap/am33xx_bbu_nand.c8
1 files 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 ed55fd1ce1..ee767d32e4 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;