]> git.baikalelectronics.ru Git - kernel.git/commit
dsa: fix freeing of sparse port allocation
authorFlorian Fainelli <florian@openwrt.org>
Mon, 25 Mar 2013 05:03:40 +0000 (05:03 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Mar 2013 16:23:41 +0000 (12:23 -0400)
commit185af263c58ff30bbf6059be880cbd3eb9b17bbe
tree544ab11b3ab0f788ae8a7e087b62ac4590579785
parent7d7cb6e0edc9e3650e9441811d14b11f90173402
dsa: fix freeing of sparse port allocation

If we have defined a sparse port allocation which is non-contiguous and
contains gaps, the code freeing port_names will just stop when it
encouters a first NULL port_names, which is not right, we should iterate
over all possible number of ports (DSA_MAX_PORTS) until we are done.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa.c