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

Commit fa3df928 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

br: remove redundant check and init



Since these checks and initialization are done in
dev_ethtool_get_settings called later on, remove this redundancy.

Signed-off-by: default avatarJiri Pirko <jpirko@redhat.com>
Acked-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e8aaebc6
Loading
Loading
Loading
Loading
+12 −14
Original line number Diff line number Diff line
@@ -33,8 +33,7 @@
 */
static int port_cost(struct net_device *dev)
{
	if (dev->ethtool_ops && dev->ethtool_ops->get_settings) {
		struct ethtool_cmd ecmd = { .cmd = ETHTOOL_GSET, };
	struct ethtool_cmd ecmd;

	if (!dev_ethtool_get_settings(dev, &ecmd)) {
		switch (ethtool_cmd_speed(&ecmd)) {
@@ -48,7 +47,6 @@ static int port_cost(struct net_device *dev)
			return 100;
		}
	}
	}

	/* Old silly heuristics based on name */
	if (!strncmp(dev->name, "lec", 3))