diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-13 06:20:30 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-13 06:20:30 +0000 |
| commit | 847f63be876fe006c2a136d0414e63a44f432753 (patch) | |
| tree | 782c108918d1881a791a291ebd0c80e553d44718 | |
| parent | 62131ec093a9808ef2d9a5fc0b4c8840ef4a5df4 (diff) | |
already checked below, then err()
Signed-off-by: Leah Rowe <leah@libreboot.org>
| -rw-r--r-- | util/nvmutil/nvmutil.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 8be216aa..da6336aa 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -1617,9 +1617,6 @@ static ssize_t do_rw(int fd, uint8_t *mem, size_t len, off_t off, int rw_type) { - if ((unsigned int)rw_type > IO_PWRITE) - goto err_do_rw; - if (rw_type == IO_READ) return read(fd, mem, len); @@ -1629,7 +1626,6 @@ do_rw(int fd, uint8_t *mem, if (rw_type == IO_PREAD || rw_type == IO_PWRITE) return prw(fd, mem, len, off, rw_type); -err_do_rw: errno = EIO; return -1; } |
