Thread (2 messages) 2 messages, 2 authors, 2015-09-15

Re: [PATCH 3/5] lan78xx: update to use phylib

flat view

From: David Miller <davem@davemloft.net>
Date: 2015-09-15 21:46:41

From: <Woojung.Huh@microchip.com>
Date: Thu, 10 Sep 2015 22:16:11 +0000
quoted hunk ↗ jump to hunk
@@ -1287,42 +1074,30 @@ static int lan78xx_set_wol(struct net_device *netdev,
 static int lan78xx_get_eee(struct net_device *net, struct ethtool_eee *edata)
 {
 	struct lan78xx_net *dev = netdev_priv(net);
+	struct phy_device *phydev = net->phydev;
 	int ret;
 	u32 buf;
-	u32 adv, lpadv;
 
 	ret = usb_autopm_get_interface(dev->intf);
 	if (ret < 0)
 		return ret;
 
+	ret = phy_ethtool_get_eee(phydev, edata);
+	if (ret)
+		return ret;
+
You cannot return directly if phy_ethtool_get_eee() returns an error,
you must branch to the end of this function and properly perform
the usb_autopm_get_interface().
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help