Browse Source

mtd: cfi_flash: fix indentation

The indentation is misleading here and suggests that the write command
will be only executed in the else clause.
It seems like this is not intended, so fix the indentation to avoid
both compiler warnings and puzzled readers.

Pointed out by GCC 6.2's -Wmisleading-indentation warning.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Andre Przywara 8 years ago
parent
commit
58eab3287b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/mtd/cfi_flash.c

+ 2 - 2
drivers/mtd/cfi_flash.c

@@ -1456,8 +1456,8 @@ static int cfi_protect_bugfix(flash_info_t *info, long sector, int prot)
 				cmd = FLASH_CMD_PROTECT_SET;
 				cmd = FLASH_CMD_PROTECT_SET;
 			else
 			else
 				cmd = FLASH_CMD_PROTECT_CLEAR;
 				cmd = FLASH_CMD_PROTECT_CLEAR;
-				flash_write_cmd(info, sector, 0,
-					  FLASH_CMD_PROTECT);
+
+			flash_write_cmd(info, sector, 0, FLASH_CMD_PROTECT);
 			flash_write_cmd(info, sector, 0, cmd);
 			flash_write_cmd(info, sector, 0, cmd);
 			/* re-enable interrupts if necessary */
 			/* re-enable interrupts if necessary */
 			if (flag)
 			if (flag)