crypto/ccp: fix fd leak on probe failure
[dpdk.git] / drivers / crypto / ccp / ccp_dev.c
index 80fe6a4..7d98b2e 100644 (file)
@@ -760,7 +760,7 @@ ccp_probe_device(const char *dirname, uint16_t domain,
        return 0;
 fail:
        CCP_LOG_ERR("CCP Device probe failed");
-       if (uio_fd > 0)
+       if (uio_fd >= 0)
                close(uio_fd);
        if (ccp_dev)
                rte_free(ccp_dev);