summaryrefslogtreecommitdiff
path: root/drivers/pci/host/pcie-hisi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/host/pcie-hisi.c')
-rw-r--r--drivers/pci/host/pcie-hisi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/host/pcie-hisi.c b/drivers/pci/host/pcie-hisi.c
index 163671a4f798..77f7c669a1b9 100644
--- a/drivers/pci/host/pcie-hisi.c
+++ b/drivers/pci/host/pcie-hisi.c
@@ -61,7 +61,9 @@ static int hisi_pcie_cfg_read(struct pcie_port *pp, int where, int size,
*val = *(u8 __force *) walker;
else if (size == 2)
*val = *(u16 __force *) walker;
- else if (size != 4)
+ else if (size == 4)
+ *val = reg_val;
+ else
return PCIBIOS_BAD_REGISTER_NUMBER;
return PCIBIOS_SUCCESSFUL;