Skip to content
Commit 8e4bfbe6 authored by Yang Yingliang's avatar Yang Yingliang Committed by Jon Mason
Browse files

PCI: endpoint: pci-epf-vntb: fix error handle in epf_ntb_mw_bar_init()



In error case of epf_ntb_mw_bar_init(), memory window BARs should be
cleared, so add 'num_mws' parameter in epf_ntb_mw_bar_clear() and
calling it in error path to clear the BARs. Also add missing error
code when pci_epc_mem_alloc_addr() fails.

Fixes: ff32fac00d97 ("NTB: EPF: support NTB transfer between PCI RC and EP connection")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
parent 556a2c7d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment