diff options
author | Matvejchikov Ilya <matvejchikov@gmail.com> | 2011-07-12 21:47:38 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-13 02:31:39 -0700 |
commit | 390fd0b388e4f85549e5d60bdeb21364b344d9b9 (patch) | |
tree | 0e8aba9868d018592e6911294b60223f8fa3e91b /net/ipv4 | |
parent | 9173a88f46bf53e2fa85337563b39e13c43c7f2e (diff) | |
download | linux-stable-390fd0b388e4f85549e5d60bdeb21364b344d9b9.tar.gz linux-stable-390fd0b388e4f85549e5d60bdeb21364b344d9b9.tar.bz2 linux-stable-390fd0b388e4f85549e5d60bdeb21364b344d9b9.zip |
slip: remove dead code within the slip initialization
This following code contains a dead "if (dev).." block:
...
for (i = 0; i < slip_maxdev; i++) {
dev = slip_devs[i];
if (dev == NULL)
break;
}
/* Sorry, too many, all slots in use */
if (i >= slip_maxdev)
return NULL;
if (dev) {
sl = netdev_priv(dev);
if (test_bit(SLF_INUSE, &sl->flags)) {
unregister_netdevice(dev);
dev = NULL;
slip_devs[i] = NULL;
}
}
...
The reason is that the code starting with "if (dev).." is never called as
when we found an empty slot (dev == NULL) we break the loop and "if (dev).."
not works eiter the loop ends and we get out with "i >= slip_maxdev".
Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
0 files changed, 0 insertions, 0 deletions