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:
parent
71417412e2
commit
36a744ed79
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue