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

- From: David Miller \<davem@davemloft.net\>
- Date: 2015-09-15 21:46:41 
- List: netdev
- Page: https://ratatoskr.run/netdev/2015/09/10996520
- Thread: https://ratatoskr.run/netdev/2015/09/10996344/t.md

```text
From: <Woojung.Huh@microchip.com>
Date: Thu, 10 Sep 2015 22:16:11 +0000

> @@ -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().
```
