]> git.droids-corp.org - dpdk.git/blobdiff - drivers/crypto/ccp/ccp_pci.c
eal/windows: add missing SPDX license tag
[dpdk.git] / drivers / crypto / ccp / ccp_pci.c
index 59152ca5d1fee0ff525cc18414e60536ebcbb8aa..38029a90816f7f86976c24171538ce3f682f8257 100644 (file)
@@ -15,6 +15,7 @@
 static const char * const uio_module_names[] = {
        "igb_uio",
        "uio_pci_generic",
+       "vfio_pci"
 };
 
 int
@@ -31,12 +32,15 @@ ccp_check_pci_uio_module(void)
        while (uio_module_names[i] != NULL) {
                while (fgets(buf, sizeof(buf), fp) != NULL) {
                        if (!strncmp(buf, uio_module_names[i],
-                                    strlen(uio_module_names[i])))
+                                    strlen(uio_module_names[i]))) {
+                               fclose(fp);
                                return i;
+                       }
                }
                i++;
                rewind(fp);
        }
+       fclose(fp);
        printf("Insert igb_uio or uio_pci_generic kernel module(s)");
        return -1;/* uio not inserted */
 }