提交 4e41b7b5 编写于 作者: D Dinghao Liu 提交者: Yang Yingliang

ntb: intel: Fix memleak in intel_ntb_pci_probe

mainline inclusion
from mainline-v5.10-rc1
commit dbb8df5c
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I47H3V
CVE: NA

--------------------------------

The default error branch of a series of pdev_is_gen calls
should free ndev just like what we've done in these calls.

Fixes: 26bfe3d0 ("ntb: intel: Add Icelake (gen4) support for Intel NTB")
Signed-off-by: NDinghao Liu <dinghao.liu@zju.edu.cn>
Acked-by: NDave Jiang <dave.jiang@intel.com>
Signed-off-by: NJon Mason <jdmason@kudzu.us>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 5f4961c1
......@@ -1897,7 +1897,7 @@ static int intel_ntb_pci_probe(struct pci_dev *pdev,
goto err_init_dev;
} else {
rc = -EINVAL;
goto err_ndev;
goto err_init_pci;
}
ndev_reset_unsafe_flags(ndev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册