diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-13 06:20:30 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-26 06:59:41 +0000 |
| commit | 54536b045432e8c78afb264e7b3fed7c6d4487c1 (patch) | |
| tree | 0b64eeda2a7244fb9af3812dea7045a5e864ff11 /util/nvmutil | |
| parent | f99921d717adf8450738eeaeb8a1dec0e3e339bb (diff) | |
util/nvmutil: remove pointless check
already checked below, then err()
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
| -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; } |
