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>
This commit is contained in:
parent
652faa98ec
commit
ee83f77645
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user