]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: Fix off-by-one in switch address parsing
authorFlorian Fainelli <f.fainelli@gmail.com>
Sun, 12 Jul 2015 01:02:11 +0000 (18:02 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 12 Jul 2015 06:25:16 +0000 (23:25 -0700)
commitfe7f5d452f6a5b3d0b8551e0b96d6c2a0846c0d9
treeb35f6925713d88442f5a3e5d2490b9165ba42b29
parent2ce561455ae9a371fe238af8905fdd5c7390f451
net: dsa: Fix off-by-one in switch address parsing

cd->sw_addr is used as a MDIO bus address, which cannot exceed
PHY_MAX_ADDR (32), our check was off-by-one.

Fixes: 5ece5786c868 ("dsa: add device tree bindings to register DSA switches")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa.c