diff options
Diffstat (limited to 'drivers/bcma')
-rw-r--r-- | drivers/bcma/driver_pci_host.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/bcma/driver_pci_host.c b/drivers/bcma/driver_pci_host.c index cf3dca987257..4a4152389515 100644 --- a/drivers/bcma/driver_pci_host.c +++ b/drivers/bcma/driver_pci_host.c | |||
@@ -94,7 +94,7 @@ static int bcma_extpci_read_config(struct bcma_drv_pci *pc, unsigned int dev, | |||
94 | if (dev == 0) { | 94 | if (dev == 0) { |
95 | /* we support only two functions on device 0 */ | 95 | /* we support only two functions on device 0 */ |
96 | if (func > 1) | 96 | if (func > 1) |
97 | return -EINVAL; | 97 | goto out; |
98 | 98 | ||
99 | /* accesses to config registers with offsets >= 256 | 99 | /* accesses to config registers with offsets >= 256 |
100 | * requires indirect access. | 100 | * requires indirect access. |
@@ -157,6 +157,10 @@ static int bcma_extpci_write_config(struct bcma_drv_pci *pc, unsigned int dev, | |||
157 | if (unlikely(len != 1 && len != 2 && len != 4)) | 157 | if (unlikely(len != 1 && len != 2 && len != 4)) |
158 | goto out; | 158 | goto out; |
159 | if (dev == 0) { | 159 | if (dev == 0) { |
160 | /* we support only two functions on device 0 */ | ||
161 | if (func > 1) | ||
162 | goto out; | ||
163 | |||
160 | /* accesses to config registers with offsets >= 256 | 164 | /* accesses to config registers with offsets >= 256 |
161 | * requires indirect access. | 165 | * requires indirect access. |
162 | */ | 166 | */ |