Skip to content

bnxt: clean up PCI mappings on attach mapping failure#2256

Open
lhx2000 wants to merge 1 commit into
freebsd:mainfrom
lhx2000:free-pci-map
Open

bnxt: clean up PCI mappings on attach mapping failure#2256
lhx2000 wants to merge 1 commit into
freebsd:mainfrom
lhx2000:free-pci-map

Conversation

@lhx2000

@lhx2000 lhx2000 commented Jun 3, 2026

Copy link
Copy Markdown

If bnxt_pci_mapping() succeeds in mapping BAR0 but fails while mapping BAR2, bnxt_attach_pre() previously skipped bnxt_pci_mapping_free() and only disabled bus mastering. Route the failure path through free_pci_map so any partially mapped PCI BAR resources are released.

Remove the now-unused pci_map_fail label.

If bnxt_pci_mapping() succeeds in mapping BAR0 but fails while mapping
BAR2, bnxt_attach_pre() previously skipped bnxt_pci_mapping_free() and
only disabled bus mastering. Route the failure path through free_pci_map
so any partially mapped PCI BAR resources are released.

Remove the now-unused pci_map_fail label.

Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant