diff options
author | Yonglong Liu <liuyonglong@huawei.com> | 2019-06-13 17:12:28 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-14 19:26:16 -0700 |
commit | d547ecdc1fc1eb5e9caf678d2f1c02cf3d77cbe7 (patch) | |
tree | 6852c3b0f36360920ece35d2ff97276d88b9392b /drivers | |
parent | 31bb229d6f4a603a351d670ac078dff8ba3af398 (diff) | |
download | linux-d547ecdc1fc1eb5e9caf678d2f1c02cf3d77cbe7.tar.bz2 |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 66d733b130b4..73de4b06ba4d 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -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; } |