
From: shenhao <shenhao21@huawei.com> driver inclusion category: bugfix bugzilla: NA CVE: NA -------------------------------------------------- This patch deletes unnecessary null pointer judgement of data in hns3_get_regs() function for cleanup. Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: shenhao <shenhao21@huawei.com> Reviewed-by: Zhong Zhaohui <zhongzhaohui@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c index 1ecbc1f..969978f 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -1292,7 +1292,7 @@ static void hns3_get_regs(struct net_device *netdev, { struct hnae3_handle *h = hns3_get_handle(netdev); - if (!h->ae_algo->ops->get_regs || !data) + if (!h->ae_algo->ops->get_regs) return; h->ae_algo->ops->get_regs(h, &cmd->version, data); -- 1.8.3