net: hns3: add error handler for hns3_nic_init_vector_data()
authorHuazhong Tan <tanhuazhong@huawei.com>
Tue, 30 Oct 2018 13:50:43 +0000 (21:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Oct 2018 19:42:38 +0000 (12:42 -0700)
commitece4bf46e98c9f3775a488f3932a531508d3b1a2
treea7ddcd25fd9c6244c11a4b4e59bcbfcb8c43080b
parentd48051c5b8376038c2b287c3b1bd55b8d391d567
net: hns3: add error handler for hns3_nic_init_vector_data()

When hns3_nic_init_vector_data() fails to map ring to vector,
it should cancel the netif_napi_add() that has been successfully
done and then exits.

Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c