From 847f63be876fe006c2a136d0414e63a44f432753 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 13 Mar 2026 06:20:30 +0000 Subject: util/nvmutil: remove pointless check already checked below, then err() Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'util/nvmutil/nvmutil.c') 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; } -- cgit v1.2.1