]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Fix get_vector ops in hclgevf_main module
authorYunsheng Lin <linyunsheng@huawei.com>
Fri, 6 Jul 2018 10:28:02 +0000 (11:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Jul 2018 02:13:07 +0000 (11:13 +0900)
commite9d4b0099c59e5107b8a1555f731dba6675a20d1
treef43d63d116e68e4139bfd37f8d906d0104cb4ed7
parent6dc4402c0ad64449560ea65bd7d49178fbbe273e
net: hns3: Fix get_vector ops in hclgevf_main module

The hclgevf_free_vector function expects the caller to pass
the vector_id to it, and hclgevf_put_vector pass vector to
it now, which will cause vector allocation problem.

This patch fixes it by converting vector into vector_id before
calling hclgevf_free_vector.

Fixes: efa29b6d502b ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c