]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Clear client pointer when initialize client failed or unintialize finished
authorJian Shen <shenjian15@huawei.com>
Wed, 19 Sep 2018 17:29:56 +0000 (18:29 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Sep 2018 04:20:22 +0000 (21:20 -0700)
commit8b04f3ae243afe759493ecddb9661a58d45a0aa3
treeff5c685869c97555c7cc2d27a21e54e68fa2864f
parent8ae1161b7050391739daf0d77663fb7313756703
net: hns3: Clear client pointer when initialize client failed or unintialize finished

If initialize client failed or finish uninitializing client, we should
clear the client pointer. It may cause unexpected result when use
uninitialized client. Meanwhile, we also should check whether client
exist when uninitialize it.

Fixes: 575d84053c84 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c