summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLipeng <lipeng321@huawei.com>2017-10-10 11:42:03 +0300
committerDavid S. Miller <davem@davemloft.net>2017-10-10 23:09:13 +0300
commitee83f77645332ce86863e5cef8dd3372b8ee4b87 (patch)
tree8f45c55b4b769cbf6ae45000562ec7627c825e65
parent652faa98ec383c25296fb8493f17060a2c7e3438 (diff)
downloadlinux-ee83f77645332ce86863e5cef8dd3372b8ee4b87.tar.xz
net: hns3: fixes the ring index in hns3_fini_ring
This patch fixes the ring index in hns3_fini_ring. Signed-off-by: Lipeng <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c
index 26bbc91add65..acb82cfc1b9a 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c
@@ -2661,7 +2661,7 @@ static int hns3_init_all_ring(struct hns3_nic_priv *priv)
out_when_alloc_ring_memory:
for (j = i - 1; j >= 0; j--)
- hns3_fini_ring(priv->ring_data[i].ring);
+ hns3_fini_ring(priv->ring_data[j].ring);
return -ENOMEM;
}