Slight if reordering to make error branch last.
This commit is contained in:
parent
e8a3a237fc
commit
4ac70c829c
@ -988,10 +988,10 @@ calculate_geometry(int fd)
|
||||
/* Get storage erase unit size */
|
||||
if (!is_nand)
|
||||
erasesize = NANDFS_DEF_ERASESIZE;
|
||||
else if (ioctl(fd, NAND_IO_GET_CHIP_PARAM, &chip_params) == -1)
|
||||
errx(1, "Cannot ioctl(NAND_IO_GET_CHIP_PARAM)");
|
||||
else
|
||||
else if (ioctl(fd, NAND_IO_GET_CHIP_PARAM, &chip_params) != -1)
|
||||
erasesize = chip_params.page_size * chip_params.pages_per_block;
|
||||
else
|
||||
errx(1, "Cannot ioctl(NAND_IO_GET_CHIP_PARAM)");
|
||||
|
||||
debug("erasesize: %#jx", (uintmax_t)erasesize);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user