From ee83f77645332ce86863e5cef8dd3372b8ee4b87 Mon Sep 17 00:00:00 2001 From: Lipeng Date: Tue, 10 Oct 2017 16:42:03 +0800 Subject: [PATCH] net: hns3: fixes the ring index in hns3_fini_ring This patch fixes the ring index in hns3_fini_ring. Signed-off-by: Lipeng Signed-off-by: David S. Miller --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c index 26bbc91..acb82cf 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; } -- 2.7.4