diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-03-01 13:24:22 +0100 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-03-01 13:26:51 +0100 |
commit | 89d4a1753b6632327f18d6c8e0842b366b736621 (patch) | |
tree | eb74be7a995d5b5b3f29f5c6794736a514109d80 /drivers/bcma/scan.c | |
parent | 7eca30aef7961e68ad74c0ef920546c2be7f6579 (diff) | |
parent | 280ad7fda5f95211857fda38960f2b6fdf6edd3e (diff) | |
download | linux-3.10-89d4a1753b6632327f18d6c8e0842b366b736621.tar.gz linux-3.10-89d4a1753b6632327f18d6c8e0842b366b736621.tar.bz2 linux-3.10-89d4a1753b6632327f18d6c8e0842b366b736621.zip |
Merge branch 'irqdomain/next' of git://git.secretlab.ca/git/linux-2.6
Diffstat (limited to 'drivers/bcma/scan.c')
-rw-r--r-- | drivers/bcma/scan.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c index cad99485768..3a2f672db9a 100644 --- a/drivers/bcma/scan.c +++ b/drivers/bcma/scan.c @@ -399,15 +399,18 @@ int bcma_bus_scan(struct bcma_bus *bus) core->bus = bus; err = bcma_get_next_core(bus, &eromptr, NULL, core_num, core); - if (err == -ENODEV) { - core_num++; - continue; - } else if (err == -ENXIO) - continue; - else if (err == -ESPIPE) - break; - else if (err < 0) + if (err < 0) { + kfree(core); + if (err == -ENODEV) { + core_num++; + continue; + } else if (err == -ENXIO) { + continue; + } else if (err == -ESPIPE) { + break; + } return err; + } core->core_index = core_num++; bus->nr_cores++; |