[PATCH openEuler-5.10 07/28] PCI/ERR: Simplify by computing pci_pcie_type() once