mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Slight if reordering to make error branch last.
This commit is contained in:
parent
e8a3a237fc
commit
4ac70c829c
1 changed files with 3 additions and 3 deletions
|
|
@ -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…
Reference in a new issue