]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Check variable is valid before assigning it to another
authorYonglong Liu <liuyonglong@huawei.com>
Wed, 20 Feb 2019 02:32:41 +0000 (10:32 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Feb 2019 00:29:04 +0000 (16:29 -0800)
commit36539513cf85c87ae2f59e9d14712bb1e404239f
tree6d1a3e46c8a0f39359e55cfbc1a6d2ec345cfa10
parent758a9186f3ee6995bf743530e404825833417ba3
net: hns3: Check variable is valid before assigning it to another

In hnae3_register_ae_dev(), ae_algo->ops is assigned to ae_dev->ops
before check that ae_algo->ops is valid.

And in hnae3_register_ae_algo(), missing check for ae_algo->ops.

This patch fixes them.

Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.c