aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma/sprom.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-04-18 13:37:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-18 13:37:33 -0400
commitdbd717e37bf1409fd250d13aef2cab07bcae8c88 (patch)
tree1e8c0b94388bf7a5822a49ff3c47bddc06382c2b /drivers/bcma/sprom.c
parent9fe5642f4a3b13beb43c2633db7df22dd9d99250 (diff)
parentfd09c85fe15aa66a69f091ba178817d5ef82476d (diff)
downloadkernel_goldelico_gta04-dbd717e37bf1409fd250d13aef2cab07bcae8c88.zip
kernel_goldelico_gta04-dbd717e37bf1409fd250d13aef2cab07bcae8c88.tar.gz
kernel_goldelico_gta04-dbd717e37bf1409fd250d13aef2cab07bcae8c88.tar.bz2
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
Diffstat (limited to 'drivers/bcma/sprom.c')
-rw-r--r--drivers/bcma/sprom.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/bcma/sprom.c b/drivers/bcma/sprom.c
index cdcf75c..3e2a600 100644
--- a/drivers/bcma/sprom.c
+++ b/drivers/bcma/sprom.c
@@ -404,16 +404,19 @@ int bcma_sprom_get(struct bcma_bus *bus)
return -EOPNOTSUPP;
if (!bcma_sprom_ext_available(bus)) {
+ bool sprom_onchip;
+
/*
* External SPROM takes precedence so check
* on-chip OTP only when no external SPROM
* is present.
*/
- if (bcma_sprom_onchip_available(bus)) {
+ sprom_onchip = bcma_sprom_onchip_available(bus);
+ if (sprom_onchip) {
/* determine offset */
offset = bcma_sprom_onchip_offset(bus);
}
- if (!offset) {
+ if (!offset || !sprom_onchip) {
/*
* Maybe there is no SPROM on the device?
* Now we ask the arch code if there is some sprom