summaryrefslogtreecommitdiffstats
path: root/drivers/bcma/main.c
diff options
context:
space:
mode:
authorHauke Mehrtens2011-07-09 13:22:03 +0200
committerJohn W. Linville2011-07-11 21:02:17 +0200
commit534e7a4566ca5fd3c0c92a655bcbaa6f9bd13042 (patch)
treed33ce90d22e75c305e8c1a1a1b4b0181379d16b7 /drivers/bcma/main.c
parentlibertas: fix errors in functions accessing module registers (diff)
downloadkernel-qcow2-linux-534e7a4566ca5fd3c0c92a655bcbaa6f9bd13042.tar.gz
kernel-qcow2-linux-534e7a4566ca5fd3c0c92a655bcbaa6f9bd13042.tar.xz
kernel-qcow2-linux-534e7a4566ca5fd3c0c92a655bcbaa6f9bd13042.zip
bcma: add check if sprom is available before accessing it.
The SoCs like the bcm4716 do not have a sprom on the bcma bus like a pcie device. It stores the values in some partition on flash memory. For ssb this informations are read out in the bcm47xx arch code, something like that should also be implemented for bcma. Without this patch bcma panics on SoCs. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/main.c')
-rw-r--r--drivers/bcma/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 08a14a3d667e..873e2e4ac55f 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -149,7 +149,9 @@ int bcma_bus_register(struct bcma_bus *bus)
/* Try to get SPROM */
err = bcma_sprom_get(bus);
- if (err) {
+ if (err == -ENOENT) {
+ pr_err("No SPROM available\n");
+ } else if (err) {
pr_err("Failed to get SPROM: %d\n", err);
return -ENOENT;
}