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:
Yonglong Liu 2019-06-13 17:12:28 +08:00 committed by David S. Miller
parent 31bb229d6f
commit d547ecdc1f
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}