9
0
Fork 0

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>
This commit is contained in:
Sascha Hauer 2014-09-30 15:06:07 +02:00
parent 71417412e2
commit 36a744ed79
1 changed files with 4 additions and 4 deletions

View File

@ -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;