diff options
author | Dave Barach <dave@barachs.net> | 2020-05-04 14:47:45 -0400 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2020-08-18 09:54:56 +0000 |
commit | d63d353faa54b5a0a8724d7491c15331b5dcc006 (patch) | |
tree | c33d78830adf9418d0224c30fffb2df7bd6479d8 /src/vlib | |
parent | 6e25cf65050f98fe5f0c9f6d91a5d3375b0cd608 (diff) |
misc: fix coverity warnings
Type: fix
Ticket: VPP-1837
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I51660e4b02f449bd2db12a8cfd395c6c343d2dee
(cherry picked from commit c72950e811880c22e5b350c4b1cb5e31b0735b4d)
Diffstat (limited to 'src/vlib')
-rw-r--r-- | src/vlib/linux/pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vlib/linux/pci.c b/src/vlib/linux/pci.c index 8af1cdab0d4..722fb888117 100644 --- a/src/vlib/linux/pci.c +++ b/src/vlib/linux/pci.c @@ -1137,7 +1137,7 @@ vlib_pci_map_region_int (vlib_main_t * vm, vlib_pci_dev_handle_t h, if (*result == (void *) -1) { error = clib_error_return_unix (0, "mmap `BAR%u'", bar); - if (p->type == LINUX_PCI_DEVICE_TYPE_UIO) + if (p->type == LINUX_PCI_DEVICE_TYPE_UIO && (fd != -1)) close (fd); return error; } |