mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 09:02:06 +00:00
net: hns3: free irq when exit from abnormal branch
In hns3_nic_init_irq(), if request irq fail at index i, the function return directly without releasing irq resources that already requested, and nowhere else will release them. Signed-off-by: Yonglong Liu <liuyonglong@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
31bb229d6f
commit
d547ecdc1f
1 changed files with 1 additions and 0 deletions
|
@ -143,6 +143,7 @@ static int hns3_nic_init_irq(struct hns3_nic_priv *priv)
|
||||||
if (ret) {
|
if (ret) {
|
||||||
netdev_err(priv->netdev, "request irq(%d) fail\n",
|
netdev_err(priv->netdev, "request irq(%d) fail\n",
|
||||||
tqp_vectors->vector_irq);
|
tqp_vectors->vector_irq);
|
||||||
|
hns3_nic_uninit_irq(priv);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue