]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:23:05 +0000 (14:23 -0300)
commit76dc4caa51045069d40f3c6587e901ec522ccd3c
tree83cfec1371d9ab6eb87a963bb94a6d126de61b1b
parent17901db4f4a92a23623fc594863d271182d47c1f
net: hns3: Check variable is valid before assigning it to another

BugLink: https://bugs.launchpad.net/bugs/1857158
[ Upstream commit 676131f7c53ecdd79e29fc8cfcdefe6f9f2485e8 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hnae3.c