diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2010-11-03 23:28:45 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-16 16:37:03 -0500 |
commit | ca4a0831917d6541b45f03542257fcb20dc9cf4a (patch) | |
tree | 7a624ee91b1137e941a13e0899c2f2581e61769e /drivers | |
parent | 54435f9ec837cf0bb0ea02a2bb6362a6aaef5250 (diff) |
ssb: return -ENOMEM on alloc fail (instead of CRC check's result)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ssb/pci.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c index 3226832df32..b5343ac37ee 100644 --- a/drivers/ssb/pci.c +++ b/drivers/ssb/pci.c @@ -619,7 +619,7 @@ static int ssb_pci_sprom_get(struct ssb_bus *bus, struct ssb_sprom *sprom) { const struct ssb_sprom *fallback; - int err = -ENOMEM; + int err; u16 *buf; if (!ssb_is_sprom_available(bus)) { @@ -646,7 +646,7 @@ static int ssb_pci_sprom_get(struct ssb_bus *bus, buf = kcalloc(SSB_SPROMSIZE_WORDS_R123, sizeof(u16), GFP_KERNEL); if (!buf) - goto out; + return -ENOMEM; bus->sprom_size = SSB_SPROMSIZE_WORDS_R123; sprom_do_read(bus, buf); err = sprom_check_crc(buf, bus->sprom_size); @@ -656,7 +656,7 @@ static int ssb_pci_sprom_get(struct ssb_bus *bus, buf = kcalloc(SSB_SPROMSIZE_WORDS_R4, sizeof(u16), GFP_KERNEL); if (!buf) - goto out; + return -ENOMEM; bus->sprom_size = SSB_SPROMSIZE_WORDS_R4; sprom_do_read(bus, buf); err = sprom_check_crc(buf, bus->sprom_size); @@ -678,7 +678,6 @@ static int ssb_pci_sprom_get(struct ssb_bus *bus, out_free: kfree(buf); -out: return err; } |