PCI: Fail pci_map_rom() if the option ROM is invalid
If we detect a invalid PCI option ROM (e.g., invalid ROM header signature), we should unmap it immediately and fail. It doesn't make any sense to return a mapped area with size of 0. I have seen this case on Intel GVTg vGPU, which has no VBIOS. It will not cause a real problem, but we should skip it as early as possible. Signed-off-by: NChangbin Du <changbin.du@intel.com> [bhelgaas: split non-functional change into separate patch] Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Showing
想要评论请 注册 或 登录