X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=net%2Fbridge%2Fbr_ioctl.c;h=bb15e9e259b12e0bae720bf3fa7ff93ad2eb6afc;hb=d9cc20484e5e48c6a5deb4387c20fd45bfbdde8c;hp=eda0fbfc923a3b9603ad38150037803133edc28e;hpb=bc95f3669f5e6f63cf0b84fe4922c3c6dd4aa775;p=linux-2.6-omap-h63xx.git diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c index eda0fbfc923..bb15e9e259b 100644 --- a/net/bridge/br_ioctl.c +++ b/net/bridge/br_ioctl.c @@ -27,7 +27,9 @@ static int get_bridge_ifindices(int *indices, int num) struct net_device *dev; int i = 0; - for (dev = dev_base; dev && i < num; dev = dev->next) { + for_each_netdev(dev) { + if (i >= num) + break; if (dev->priv_flags & IFF_EBRIDGE) indices[i++] = dev->ifindex; }