Skip to content
Snippets Groups Projects
Commit 2303a2ff authored by huangguangbin2's avatar huangguangbin2 Committed by 谢秀奇
Browse files

net: hns3: add a check for get_reset_level


driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

Before calling get_reset_level, we should check whether it is NULL.

Feature or Bugfix:Bugfix

Signed-off-by: default avatarhuangguangbin (A) <huangguangbin2@huawei.com>
Reviewed-by: default avatarxuzaibo <xuzaibo@huawei.com>
Reviewed-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
Reviewed-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 4ce9b0ae
No related branches found
No related tags found
No related merge requests found
......@@ -2043,7 +2043,7 @@ static pci_ers_result_t hns3_slot_reset(struct pci_dev *pdev)
ops = ae_dev->ops;
/* request the reset */
if (ops->reset_event) {
if (ops->reset_event && ops->get_reset_level) {
if (!ae_dev->override_pci_need_reset) {
reset_type = ops->get_reset_level(ae_dev,
&ae_dev->hw_err_reset_req);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment