diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2015-08-05 23:55:52 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-08-06 00:00:32 +0200 |
commit | b7edaca4e825fd5d7a6ddce3548cc1f7a7337cf8 (patch) | |
tree | 221d6c5be36fa3b2133200ebc3e520d4382dca8f /net/dsa/dsa.c | |
parent | c948c26048ecb1023d2e68222c736f7da41da498 (diff) | |
parent | cbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f (diff) | |
download | linux-stable-b7edaca4e825fd5d7a6ddce3548cc1f7a7337cf8.tar.gz linux-stable-b7edaca4e825fd5d7a6ddce3548cc1f7a7337cf8.tar.bz2 linux-stable-b7edaca4e825fd5d7a6ddce3548cc1f7a7337cf8.zip |
Merge branch 'linus' into x86/apic
Pull in upstream changes to avoid conflicts
Diffstat (limited to 'net/dsa/dsa.c')
-rw-r--r-- | net/dsa/dsa.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 392e29a0227d..b445d492c115 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -630,7 +630,7 @@ static int dsa_of_probe(struct device *dev) continue; cd->sw_addr = be32_to_cpup(sw_addr); - if (cd->sw_addr > PHY_MAX_ADDR) + if (cd->sw_addr >= PHY_MAX_ADDR) continue; if (!of_property_read_u32(child, "eeprom-length", &eeprom_len)) @@ -642,6 +642,8 @@ static int dsa_of_probe(struct device *dev) continue; port_index = be32_to_cpup(port_reg); + if (port_index >= DSA_MAX_PORTS) + break; port_name = of_get_property(port, "label", NULL); if (!port_name) @@ -666,8 +668,6 @@ static int dsa_of_probe(struct device *dev) goto out_free_chip; } - if (port_index == DSA_MAX_PORTS) - break; } } |