net: hns3: Add a check for client instance init state
authorFuyun Liang <liangfuyun1@huawei.com>
Tue, 15 May 2018 18:20:07 +0000 (19:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 May 2018 15:33:07 +0000 (11:33 -0400)
commite3afa96365c916319a1068ac50b838b2256cc6df
tree446f955cb9df76a6a59d80e6825f4f7a4e7b2673
parent3e249d3bed677f18a8a9b87b2b9cf1beaeef886c
net: hns3: Add a check for client instance init state

If the client instance is initializd failed, we do not need to uninit it.
This patch adds a state check to check init state of client instance.

Fixes: 38caee9d3ee8 ("net: hns3: Add support of the HNAE3 framework")
Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.c
drivers/net/ethernet/hisilicon/hns3/hnae3.h