net: hns3: Fix a misuse to devm_free_irq

we should use free_irq to free the nic irq during the unloading time.
because we use request_irq to apply it when nic up. It will crash if
up net device after reset the port. This patch fixes the issue.

Signed-off-by: qumingguang <qumingguang@huawei.com>
Signed-off-by: Lipeng <lipeng321@huawei.com>
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
qumingguang 2017-11-02 20:45:22 +08:00 committed by David S. Miller
parent bb6b94a896
commit ae064e6123
1 changed files with 2 additions and 3 deletions

View File

@ -2558,8 +2558,7 @@ static int hns3_nic_uninit_vector_data(struct hns3_nic_priv *priv)
(void)irq_set_affinity_hint(
priv->tqp_vector[i].vector_irq,
NULL);
devm_free_irq(&pdev->dev,
priv->tqp_vector[i].vector_irq,
free_irq(priv->tqp_vector[i].vector_irq,
&priv->tqp_vector[i]);
}