net: hns3: free the ring_data structrue when change tqps
authorPeng Li <lipeng321@huawei.com>
Fri, 22 Dec 2017 04:21:43 +0000 (12:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Apr 2018 10:32:12 +0000 (12:32 +0200)
commitf7b0ea2245a0c7e6b255b0fa6f0a83a04a821da5
treee824294a9066f30c1115cac049d551cc189b195c
parent93b8f4a2302b68d42bd384076c846f86a8decda4
net: hns3: free the ring_data structrue when change tqps

[ Upstream commit 99fdf6b1cadf41bb253408589788f025027274f3 ]

This patch fixes a memory leak problems in change tqps process,
the function hns3_uninit_all_ring and hns3_init_all_ring
may be called many times.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Mingguang Qu <qumingguang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c