aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma/scan.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-03-19 12:41:24 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-03-19 12:41:24 -0400
commit9ce28d827f74d0acdd058bded8bab5309b0f5c8f (patch)
tree634f22e8df9c7fd3966b3639e3e997436751ca50 /drivers/bcma/scan.c
parentf074ff92b5b26f3a559fab1203c36e140ea8d067 (diff)
parentc16fa4f2ad19908a47c63d8fa436a1178438c7e7 (diff)
Merge tag 'v3.3' into staging/for_v3.4
* tag 'v3.3': (1646 commits) Linux 3.3 Don't limit non-nested epoll paths netfilter: ctnetlink: fix race between delete and timeout expiration ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu. nilfs2: fix NULL pointer dereference in nilfs_load_super_block() nilfs2: clamp ns_r_segments_percentage to [1, 99] afs: Remote abort can cause BUG in rxrpc code afs: Read of file returns EBADMSG C6X: remove dead code from entry.S wimax/i2400m: fix erroneous NETDEV_TX_BUSY use net/hyperv: fix erroneous NETDEV_TX_BUSY use net/usbnet: reserve headroom on rx skbs bnx2x: fix memory leak in bnx2x_init_firmware() bnx2x: fix a crash on corrupt firmware file sch_sfq: revert dont put new flow at the end of flows ipv6: fix icmp6_dst_alloc() MAINTAINERS: Add Serge as maintainer of capabilities drivers/video/backlight/s6e63m0.c: fix corruption storing gamma mode MAINTAINERS: add entry for exynos mipi display drivers MAINTAINERS: fix link to Gustavo Padovans tree ...
Diffstat (limited to 'drivers/bcma/scan.c')
-rw-r--r--drivers/bcma/scan.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c
index cad994857683..3a2f672db9ad 100644
--- a/drivers/bcma/scan.c
+++ b/drivers/bcma/scan.c
@@ -399,15 +399,18 @@ int bcma_bus_scan(struct bcma_bus *bus)
399 core->bus = bus; 399 core->bus = bus;
400 400
401 err = bcma_get_next_core(bus, &eromptr, NULL, core_num, core); 401 err = bcma_get_next_core(bus, &eromptr, NULL, core_num, core);
402 if (err == -ENODEV) { 402 if (err < 0) {
403 core_num++; 403 kfree(core);
404 continue; 404 if (err == -ENODEV) {
405 } else if (err == -ENXIO) 405 core_num++;
406 continue; 406 continue;
407 else if (err == -ESPIPE) 407 } else if (err == -ENXIO) {
408 break; 408 continue;
409 else if (err < 0) 409 } else if (err == -ESPIPE) {
410 break;
411 }
410 return err; 412 return err;
413 }
411 414
412 core->core_index = core_num++; 415 core->core_index = core_num++;
413 bus->nr_cores++; 416 bus->nr_cores++;