net: hns3: check NULL pointer before use
authorGuangbin Huang <huangguangbin2@huawei.com>
Wed, 11 Sep 2019 02:40:38 +0000 (10:40 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Sep 2019 08:08:46 +0000 (09:08 +0100)
commitfa17c708ff5aa169eb87c9de665c1f2011cc51b9
tree9987048c1f2b15700475fa5cbb936d912b9e8d75
parent96e65abb77002722b27d773a1c28e63ed1934d4a
net: hns3: check NULL pointer before use

This patch checks ops->set_default_reset_request whether is NULL
before using it in function hns3_slot_reset.

Signed-off-by: Guangbin Huang <huangguangbin2@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