Skip to content

Commit cc1d72c

Browse files
committed
Don't try to close the global MMIO fd if it wasn't open
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
1 parent 756c3c8 commit cc1d72c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/afu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ ocxl_err ocxl_afu_close(ocxl_afu_h afu)
699699
ocxl_mmio_unmap((ocxl_mmio_h)&afu->mmios[mmio_idx]);
700700
}
701701

702-
if (afu->global_mmio_fd) {
702+
if (afu->global_mmio_fd != -1) {
703703
close(afu->global_mmio_fd);
704704
afu->global_mmio_fd = -1;
705705
}

0 commit comments

Comments
 (0)