From: Yonglong Liu Date: Thu, 13 Jun 2019 09:12:28 +0000 (+0800) Subject: net: hns3: free irq when exit from abnormal branch X-Git-Tag: v5.3-rc1~140^2~243^2~4 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=d547ecdc1fc1eb5e9caf678d2f1c02cf3d77cbe7;p=linux.git 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 Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller --- 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; }