Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx> --- drivers/bcma/main.c | 4 +++- drivers/bcma/sprom.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c index 7dd0b16..2750aa5 100644 --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c @@ -160,7 +160,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; } diff --git a/drivers/bcma/sprom.c b/drivers/bcma/sprom.c index ffbb0e3..8e8d5cf 100644 --- a/drivers/bcma/sprom.c +++ b/drivers/bcma/sprom.c @@ -143,6 +143,9 @@ int bcma_sprom_get(struct bcma_bus *bus) if (!bus->drv_cc.core) return -EOPNOTSUPP; + if (!(bus->drv_cc.capabilities & BCMA_CC_CAP_SPROM)) + return -ENOENT; + sprom = kcalloc(SSB_SPROMSIZE_WORDS_R4, sizeof(u16), GFP_KERNEL); if (!sprom) -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html