diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-05-06 17:32:21 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2021-05-06 17:32:21 +0000 |
commit | 978c3d52701afe5ccd2fcae854b6b2bcc24bc10a (patch) | |
tree | d4f651590a0df0afc2193fe9ce9d7448e81a6e74 /src | |
parent | 1e0fbba7c270701b4f27f808be988b63118d9533 (diff) | |
download | mdevd-978c3d52701afe5ccd2fcae854b6b2bcc24bc10a.tar.xz |
Cosmetic fix
Diffstat (limited to 'src')
-rw-r--r-- | src/mdevd/mdevd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mdevd/mdevd.c b/src/mdevd/mdevd.c index ba65fe8..06324eb 100644 --- a/src/mdevd/mdevd.c +++ b/src/mdevd/mdevd.c @@ -537,7 +537,7 @@ static inline int wait_for_loading (char const *sysdevpath, size_t sysdevpathlen tain_add_g(&deadline, &period) ; deepsleepuntil_g(&deadline) ; } - if (ndelay_off(lfd) < 0) + if (lfd >= 0 && ndelay_off(lfd) < 0) { fd_close(lfd) ; return -1 ; |