net: hns3: add nic_client check when initialize roce base information
authorLipeng <lipeng321@huawei.com>
Tue, 24 Oct 2017 13:02:10 +0000 (21:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:10:32 +0000 (10:10 +0100)
commit1d9205558e50b7af5fe5b054bf26f93c9255786e
treed17d7dca88bf44e20e4dcffb02a904d9bb64b098
parent0949f8afa8f1b9d6ebce48606e41dfcdafbaca4a
net: hns3: add nic_client check when initialize roce base information

[ Upstream commit 3a46f34d20d453f09defb76b11a567647939c0aa ]

Roce driver works base on HNS3 driver.If insmod Roce driver before
NIC driver there is a error because do not check nic_client. This patch
adds nic_client check when initialize roce base information.

Fixes: 46a3df9 (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support)

Signed-off-by: Lipeng <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c