]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: hns3: fix error handling int the hns3_get_vector_ring_chain
authorHuazhong Tan <tanhuazhong@huawei.com>
Tue, 18 Dec 2018 11:37:48 +0000 (19:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 19:02:23 +0000 (20:02 +0100)
commit07a521165f787cd5f9767029924bf2ad797ef60f
tree4b60f1042f8db24dc9f537fcf29c414fa32898d8
parent9b8b41319dba06ca3adb53b7aeafa4798353ac5d
net: hns3: fix error handling int the hns3_get_vector_ring_chain

[ Upstream commit cda69d244585bc4497d3bb878c22fe2b6ad647c1 ]

When hns3_get_vector_ring_chain() failed in the
hns3_nic_init_vector_data(), it should do the error handling instead
of return directly.

Also, cur_chain should be freed instead of chain and head->next should
be set to NULL in error handling of hns3_get_vector_ring_chain.

This patch fixes them.

Fixes: 73b907a083b8 ("net: hns3: bugfix for buffer not free problem during resetting")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c