net: hns3: add a check for get_reset_level
authorGuangbin Huang <huangguangbin@huawei.com>
Mon, 29 Jul 2019 02:53:23 +0000 (10:53 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jul 2019 15:23:40 +0000 (08:23 -0700)
commitaa3253b8899d685811d159288f21cd2a2dbb5f0b
tree1df1fccc19526a15295f4d6c145a097aca70727d
parent44950d28cccf3049696e02d0adebb10e112cee24
net: hns3: add a check for get_reset_level

For some cases, ops->get_reset_level may not be implemented, so we
should check whether it is NULL before calling get_reset_level.

Signed-off-by: Guangbin Huang <huangguangbin@huawei.com>
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