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
|
@ -143,6 +143,7 @@ static int hns3_nic_init_irq(struct hns3_nic_priv *priv)
|
|||
if (ret) {
|
||||
netdev_err(priv->netdev, "request irq(%d) fail\n",
|
||||
tqp_vectors->vector_irq);
|
||||
hns3_nic_uninit_irq(priv);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue