summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/ofed/drivers/net/mlx4/en_netdev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/ofed/drivers/net/mlx4/en_netdev.c b/sys/ofed/drivers/net/mlx4/en_netdev.c
index f7167d9..fd7a189 100644
--- a/sys/ofed/drivers/net/mlx4/en_netdev.c
+++ b/sys/ofed/drivers/net/mlx4/en_netdev.c
@@ -927,9 +927,6 @@ void mlx4_en_destroy_netdev(struct net_device *dev)
if (priv->allocated)
mlx4_free_hwq_res(mdev->dev, &priv->res, MLX4_EN_PAGE_SIZE);
- if (priv->sysctl)
- sysctl_ctx_free(&priv->conf_ctx);
-
mutex_lock(&mdev->state_lock);
mlx4_en_stop_port(dev);
mutex_unlock(&mdev->state_lock);
@@ -946,6 +943,9 @@ void mlx4_en_destroy_netdev(struct net_device *dev)
mlx4_en_free_resources(priv);
+ if (priv->sysctl)
+ sysctl_ctx_free(&priv->conf_ctx);
+
mtx_destroy(&priv->stats_lock.m);
mtx_destroy(&priv->vlan_lock.m);
kfree(priv);
OpenPOWER on IntegriCloud