From 7414bfa433bec48c46bb17582e94cf606a7ef117 Mon Sep 17 00:00:00 2001 From: Nathan Hintz Date: Sat, 12 Jan 2013 02:46:14 -0800 Subject: [PATCH] --- yaml --- r: 351923 b: refs/heads/master c: a35ab937cb27ec8c00b6f13cade93dc10e22b670 h: refs/heads/master i: 351921: 173372b036cac71bcf4f49bd25fc27f46f298cf9 351919: 20a23880b864dabae120d1cc70a90f140ba729be v: v3 --- [refs] | 2 +- trunk/drivers/bcma/driver_pci_host.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0e6ee0770102..6d7db5b4074c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f6734627edea983b307593f71824d7ec2dd2625a +refs/heads/master: a35ab937cb27ec8c00b6f13cade93dc10e22b670 diff --git a/trunk/drivers/bcma/driver_pci_host.c b/trunk/drivers/bcma/driver_pci_host.c index cf3dca987257..4a4152389515 100644 --- a/trunk/drivers/bcma/driver_pci_host.c +++ b/trunk/drivers/bcma/driver_pci_host.c @@ -94,7 +94,7 @@ static int bcma_extpci_read_config(struct bcma_drv_pci *pc, unsigned int dev, if (dev == 0) { /* we support only two functions on device 0 */ if (func > 1) - return -EINVAL; + goto out; /* accesses to config registers with offsets >= 256 * requires indirect access. @@ -157,6 +157,10 @@ static int bcma_extpci_write_config(struct bcma_drv_pci *pc, unsigned int dev, if (unlikely(len != 1 && len != 2 && len != 4)) goto out; if (dev == 0) { + /* we support only two functions on device 0 */ + if (func > 1) + goto out; + /* accesses to config registers with offsets >= 256 * requires indirect access. */