diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-14 06:21:58 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-26 06:59:41 +0000 |
| commit | 6c29a07ca0fc270abf096d2af156c8bbed24ba79 (patch) | |
| tree | 994bcbf2ff845689ee04ad84d25f444fa623c3f7 /util/nvmutil | |
| parent | a12f502af81f9839a926d28f7f2c1d27e5115c71 (diff) | |
util/nvmutil: always restore saved errno
the last lseek there is only there to reset
state, so its errors are irrelevant.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 493970e1..e9046dc6 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -1909,8 +1909,7 @@ try_rw_again: saved_errno = errno; if (lseek_loop(fd, off_orig, SEEK_SET, loop_eagain, loop_eintr) == (off_t)-1) { - if (r < 0) - errno = saved_errno; + errno = saved_errno; return -1; } errno = saved_errno; |
