Skip to content

Commit

Permalink
net: hns3: Fix a misuse to devm_free_irq
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
qumingguang authored and David S. Miller committed Nov 2, 2017
1 parent bb6b94a commit ae064e6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -2558,9 +2558,8 @@ 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,
&priv->tqp_vector[i]);
free_irq(priv->tqp_vector[i].vector_irq,
&priv->tqp_vector[i]);
}

priv->ring_data[i].ring->irq_init_flag = HNS3_VECTOR_NOT_INITED;
Expand Down

0 comments on commit ae064e6

Please sign in to comment.