net/ixgbe: fix mask bits register set error for FDIR
[dpdk.git] / drivers / net / mlx5 / mlx5_socket.c
index 955306d..99297d5 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright 2016 6WIND S.A.
+ * Copyright 2016 Mellanox Technologies, Ltd
  */
 
 #define _GNU_SOURCE
@@ -33,7 +34,6 @@ mlx5_socket_init(struct rte_eth_dev *dev)
        };
        int ret;
        int flags;
-       struct stat file_stat;
 
        /*
         * Initialise the socket to communicate with the secondary
@@ -59,9 +59,7 @@ mlx5_socket_init(struct rte_eth_dev *dev)
        }
        snprintf(sun.sun_path, sizeof(sun.sun_path), "/var/tmp/%s_%d",
                 MLX5_DRIVER_NAME, priv->primary_socket);
-       ret = stat(sun.sun_path, &file_stat);
-       if (!ret)
-               claim_zero(remove(sun.sun_path));
+       remove(sun.sun_path);
        ret = bind(priv->primary_socket, (const struct sockaddr *)&sun,
                   sizeof(sun));
        if (ret < 0) {
@@ -296,7 +294,7 @@ mlx5_socket_connect(struct rte_eth_dev *dev)
        }
        ret = *fd;
        close(socket_fd);
-       return 0;
+       return ret;
 error:
        if (socket_fd != -1)
                close(socket_fd);