1 --- a/drivers/bcma/sprom.c
2 +++ b/drivers/bcma/sprom.c
3 @@ -404,16 +404,19 @@ int bcma_sprom_get(struct bcma_bus *bus)
6 if (!bcma_sprom_ext_available(bus)) {
10 * External SPROM takes precedence so check
11 * on-chip OTP only when no external SPROM
14 - if (bcma_sprom_onchip_available(bus)) {
15 + sprom_onchip = bcma_sprom_onchip_available(bus);
17 /* determine offset */
18 offset = bcma_sprom_onchip_offset(bus);
21 + if (!offset || !sprom_onchip) {
23 * Maybe there is no SPROM on the device?
24 * Now we ask the arch code if there is some sprom