Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76b63da9 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'dsa-of-parsing-fixes'



Florian Fainelli says:

====================
net: dsa: OF parsing fixes

This patch series fixes two small parsing issues, the first one was
reported by Dan, the second came after looking more closely at the
code.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 2ee94014 c8cf89f7
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -630,7 +630,7 @@ static int dsa_of_probe(struct device *dev)
			continue;
			continue;


		cd->sw_addr = be32_to_cpup(sw_addr);
		cd->sw_addr = be32_to_cpup(sw_addr);
		if (cd->sw_addr > PHY_MAX_ADDR)
		if (cd->sw_addr >= PHY_MAX_ADDR)
			continue;
			continue;


		if (!of_property_read_u32(child, "eeprom-length", &eeprom_len))
		if (!of_property_read_u32(child, "eeprom-length", &eeprom_len))
@@ -642,6 +642,8 @@ static int dsa_of_probe(struct device *dev)
				continue;
				continue;


			port_index = be32_to_cpup(port_reg);
			port_index = be32_to_cpup(port_reg);
			if (port_index >= DSA_MAX_PORTS)
				break;


			port_name = of_get_property(port, "label", NULL);
			port_name = of_get_property(port, "label", NULL);
			if (!port_name)
			if (!port_name)
@@ -666,8 +668,6 @@ static int dsa_of_probe(struct device *dev)
					goto out_free_chip;
					goto out_free_chip;
			}
			}


			if (port_index == DSA_MAX_PORTS)
				break;
		}
		}
	}
	}