Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291206
b: refs/heads/master
c: 4ac887c
h: refs/heads/master
v: v3
  • Loading branch information
Arend van Spriel authored and John W. Linville committed Mar 6, 2012
1 parent 051e540 commit 7cd18ad
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c17ddc4a047c59638c7eb8537aa887a1ddb9b0b
refs/heads/master: 4ac887cfdad909f16ee1886fe4fa19b452fc7fd3
27 changes: 17 additions & 10 deletions trunk/drivers/bcma/sprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,23 @@ int bcma_arch_register_fallback_sprom(int (*sprom_callback)(struct bcma_bus *bus
static int bcma_fill_sprom_with_fallback(struct bcma_bus *bus,
struct ssb_sprom *out)
{
if (!get_fallback_sprom)
return -ENOENT;
int err;

return get_fallback_sprom(bus, out);
if (!get_fallback_sprom) {
err = -ENOENT;
goto fail;
}

err = get_fallback_sprom(bus, out);
if (err)
goto fail;

pr_debug("Using SPROM revision %d provided by"
" platform.\n", bus->sprom.revision);
return 0;
fail:
pr_warn("Using fallback SPROM failed (err %d)\n", err);
return err;
}

/**************************************************
Expand Down Expand Up @@ -317,13 +330,7 @@ int bcma_sprom_get(struct bcma_bus *bus)
* available for this device in some other storage.
*/
err = bcma_fill_sprom_with_fallback(bus, &bus->sprom);
if (err) {
pr_warn("Using fallback SPROM failed (err %d)\n", err);
} else {
pr_debug("Using SPROM revision %d provided by"
" platform.\n", bus->sprom.revision);
return 0;
}
return err;
}

sprom = kcalloc(SSB_SPROMSIZE_WORDS_R4, sizeof(u16),
Expand Down

0 comments on commit 7cd18ad

Please sign in to comment.