summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-13 03:27:25 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-13 03:27:25 +0000
commit76621fd5065c0623ef4e37b562dcf6d194843f30 (patch)
treebb84879a9704f28e3d2b18e97c627a5927080354 /util
parentb7e1af9f235c1a8e1850bb8ddbce07af50dd0d7e (diff)
util/nvmutil: minor cleanup: rw_file_once
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/nvmutil/nvmutil.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 3b289deb..abe94904 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -1587,9 +1587,10 @@ rw_file_once(int fd, uint8_t *mem, size_t len,
read_again:
rv = do_rw(fd, mem + rc, len - rc, off + rc, rw_type);
- if (rv < 0 && errno == EINTR) {
+ if (rv < 0 && errno == EINTR)
goto read_again;
- } else if (rv < 0) {
+
+ if (rv < 0) {
errno = EIO;
return -1;
}