mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-04 12:55:54 +02:00
62249258d3
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31143 3c298f89-4303-0410-b956-a3cf2f4a3e73
30 lines
628 B
Diff
30 lines
628 B
Diff
--- a/drivers/bcma/scan.c
|
|
+++ b/drivers/bcma/scan.c
|
|
@@ -458,15 +458,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++;
|