summaryrefslogtreecommitdiff
path: root/net/dsa/dsa.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2015-08-06 15:27:09 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-08-06 15:27:09 +0300
commit06059d5090118b047c5b6a621c8b57a068f7ce2c (patch)
tree47431df1c04c02dfb7ecea479321142c56ad17cc /net/dsa/dsa.c
parent80aa93128653c5f2502053c0d9740b336d975667 (diff)
parent8c10342cb48f3140d9abeadcfd2fa6625d447282 (diff)
downloadlinux-06059d5090118b047c5b6a621c8b57a068f7ce2c.tar.xz
Merge tag 'topic/drm-misc-2015-07-28' into drm-intel-next-queued
We need a few core drm patches to be able to merge Maarten's series to convert DPMS over to atomic. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'net/dsa/dsa.c')
-rw-r--r--net/dsa/dsa.c6
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;
}
}